PageRenderTime 42ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/trunk/lib/include/Log.php

https://github.com/applideveloper/OpenPNE2CE
PHP | 847 lines | 276 code | 65 blank | 506 comment | 28 complexity | f364137c56055059da8705bc2ad31e88 MD5 | raw file
Possible License(s): MPL-2.0-no-copyleft-exception, LGPL-2.1
  1. <?php
  2. /**
  3. * $Header: /repository/pear/Log/Log.php,v 1.67 2007/12/13 06:46:30 jon Exp $
  4. * $Horde: horde/lib/Log.php,v 1.15 2000/06/29 23:39:45 jon Exp $
  5. *
  6. * @version $Revision: 1.67 $
  7. * @package Log
  8. */
  9. define('PEAR_LOG_EMERG', 0); /** System is unusable */
  10. define('PEAR_LOG_ALERT', 1); /** Immediate action required */
  11. define('PEAR_LOG_CRIT', 2); /** Critical conditions */
  12. define('PEAR_LOG_ERR', 3); /** Error conditions */
  13. define('PEAR_LOG_WARNING', 4); /** Warning conditions */
  14. define('PEAR_LOG_NOTICE', 5); /** Normal but significant */
  15. define('PEAR_LOG_INFO', 6); /** Informational */
  16. define('PEAR_LOG_DEBUG', 7); /** Debug-level messages */
  17. define('PEAR_LOG_ALL', bindec('11111111')); /** All messages */
  18. define('PEAR_LOG_NONE', bindec('00000000')); /** No message */
  19. /* Log types for PHP's native error_log() function. */
  20. define('PEAR_LOG_TYPE_SYSTEM', 0); /** Use PHP's system logger */
  21. define('PEAR_LOG_TYPE_MAIL', 1); /** Use PHP's mail() function */
  22. define('PEAR_LOG_TYPE_DEBUG', 2); /** Use PHP's debugging connection */
  23. define('PEAR_LOG_TYPE_FILE', 3); /** Append to a file */
  24. /**
  25. * The Log:: class implements both an abstraction for various logging
  26. * mechanisms and the Subject end of a Subject-Observer pattern.
  27. *
  28. * @author Chuck Hagenbuch <chuck@horde.org>
  29. * @author Jon Parise <jon@php.net>
  30. * @since Horde 1.3
  31. * @package Log
  32. */
  33. class Log
  34. {
  35. /**
  36. * Indicates whether or not the log can been opened / connected.
  37. *
  38. * @var boolean
  39. * @access protected
  40. */
  41. var $_opened = false;
  42. /**
  43. * Instance-specific unique identification number.
  44. *
  45. * @var integer
  46. * @access protected
  47. */
  48. var $_id = 0;
  49. /**
  50. * The label that uniquely identifies this set of log messages.
  51. *
  52. * @var string
  53. * @access protected
  54. */
  55. var $_ident = '';
  56. /**
  57. * The default priority to use when logging an event.
  58. *
  59. * @var integer
  60. * @access protected
  61. */
  62. var $_priority = PEAR_LOG_INFO;
  63. /**
  64. * The bitmask of allowed log levels.
  65. *
  66. * @var integer
  67. * @access protected
  68. */
  69. var $_mask = PEAR_LOG_ALL;
  70. /**
  71. * Holds all Log_observer objects that wish to be notified of new messages.
  72. *
  73. * @var array
  74. * @access protected
  75. */
  76. var $_listeners = array();
  77. /**
  78. * Maps canonical format keys to position arguments for use in building
  79. * "line format" strings.
  80. *
  81. * @var array
  82. * @access protected
  83. */
  84. var $_formatMap = array('%{timestamp}' => '%1$s',
  85. '%{ident}' => '%2$s',
  86. '%{priority}' => '%3$s',
  87. '%{message}' => '%4$s',
  88. '%{file}' => '%5$s',
  89. '%{line}' => '%6$s',
  90. '%{function}' => '%7$s',
  91. '%\{' => '%%{');
  92. /**
  93. * Utility function which wraps PHP's class_exists() function to ensure
  94. * consistent behavior between PHP versions 4 and 5. Autoloading behavior
  95. * is always disabled.
  96. *
  97. * @param string $class The name of the class whose existence should
  98. * be tested.
  99. *
  100. * @return bool True if the class exists.
  101. *
  102. * @access private
  103. * @since Log 1.9.13
  104. */
  105. function _classExists($class)
  106. {
  107. if (version_compare(PHP_VERSION, '5.0.0', 'ge')) {
  108. return class_exists($class, false);
  109. }
  110. return class_exists($class);
  111. }
  112. /**
  113. * Attempts to return a concrete Log instance of type $handler.
  114. *
  115. * @param string $handler The type of concrete Log subclass to return.
  116. * Attempt to dynamically include the code for
  117. * this subclass. Currently, valid values are
  118. * 'console', 'syslog', 'sql', 'file', and 'mcal'.
  119. *
  120. * @param string $name The name of the actually log file, table, or
  121. * other specific store to use. Defaults to an
  122. * empty string, with which the subclass will
  123. * attempt to do something intelligent.
  124. *
  125. * @param string $ident The identity reported to the log system.
  126. *
  127. * @param array $conf A hash containing any additional configuration
  128. * information that a subclass might need.
  129. *
  130. * @param int $level Log messages up to and including this level.
  131. *
  132. * @return object Log The newly created concrete Log instance, or
  133. * null on an error.
  134. * @access public
  135. * @since Log 1.0
  136. */
  137. function &factory($handler, $name = '', $ident = '', $conf = array(),
  138. $level = PEAR_LOG_DEBUG)
  139. {
  140. $handler = strtolower($handler);
  141. $class = 'Log_' . $handler;
  142. $classfile = 'Log/' . $handler . '.php';
  143. /*
  144. * Attempt to include our version of the named class, but don't treat
  145. * a failure as fatal. The caller may have already included their own
  146. * version of the named class.
  147. */
  148. if (!Log::_classExists($class)) {
  149. include_once $classfile;
  150. }
  151. /* If the class exists, return a new instance of it. */
  152. if (Log::_classExists($class)) {
  153. $obj = &new $class($name, $ident, $conf, $level);
  154. return $obj;
  155. }
  156. $null = null;
  157. return $null;
  158. }
  159. /**
  160. * Attempts to return a reference to a concrete Log instance of type
  161. * $handler, only creating a new instance if no log instance with the same
  162. * parameters currently exists.
  163. *
  164. * You should use this if there are multiple places you might create a
  165. * logger, you don't want to create multiple loggers, and you don't want to
  166. * check for the existance of one each time. The singleton pattern does all
  167. * the checking work for you.
  168. *
  169. * <b>You MUST call this method with the $var = &Log::singleton() syntax.
  170. * Without the ampersand (&) in front of the method name, you will not get
  171. * a reference, you will get a copy.</b>
  172. *
  173. * @param string $handler The type of concrete Log subclass to return.
  174. * Attempt to dynamically include the code for
  175. * this subclass. Currently, valid values are
  176. * 'console', 'syslog', 'sql', 'file', and 'mcal'.
  177. *
  178. * @param string $name The name of the actually log file, table, or
  179. * other specific store to use. Defaults to an
  180. * empty string, with which the subclass will
  181. * attempt to do something intelligent.
  182. *
  183. * @param string $ident The identity reported to the log system.
  184. *
  185. * @param array $conf A hash containing any additional configuration
  186. * information that a subclass might need.
  187. *
  188. * @param int $level Log messages up to and including this level.
  189. *
  190. * @return object Log The newly created concrete Log instance, or
  191. * null on an error.
  192. * @access public
  193. * @since Log 1.0
  194. */
  195. function &singleton($handler, $name = '', $ident = '', $conf = array(),
  196. $level = PEAR_LOG_DEBUG)
  197. {
  198. static $instances;
  199. if (!isset($instances)) $instances = array();
  200. $signature = serialize(array($handler, $name, $ident, $conf, $level));
  201. if (!isset($instances[$signature])) {
  202. $instances[$signature] = &Log::factory($handler, $name, $ident,
  203. $conf, $level);
  204. }
  205. return $instances[$signature];
  206. }
  207. /**
  208. * Abstract implementation of the open() method.
  209. * @since Log 1.0
  210. */
  211. function open()
  212. {
  213. return false;
  214. }
  215. /**
  216. * Abstract implementation of the close() method.
  217. * @since Log 1.0
  218. */
  219. function close()
  220. {
  221. return false;
  222. }
  223. /**
  224. * Abstract implementation of the flush() method.
  225. * @since Log 1.8.2
  226. */
  227. function flush()
  228. {
  229. return false;
  230. }
  231. /**
  232. * Abstract implementation of the log() method.
  233. * @since Log 1.0
  234. */
  235. function log($message, $priority = null)
  236. {
  237. return false;
  238. }
  239. /**
  240. * A convenience function for logging a emergency event. It will log a
  241. * message at the PEAR_LOG_EMERG log level.
  242. *
  243. * @param mixed $message String or object containing the message
  244. * to log.
  245. *
  246. * @return boolean True if the message was successfully logged.
  247. *
  248. * @access public
  249. * @since Log 1.7.0
  250. */
  251. function emerg($message)
  252. {
  253. return $this->log($message, PEAR_LOG_EMERG);
  254. }
  255. /**
  256. * A convenience function for logging an alert event. It will log a
  257. * message at the PEAR_LOG_ALERT log level.
  258. *
  259. * @param mixed $message String or object containing the message
  260. * to log.
  261. *
  262. * @return boolean True if the message was successfully logged.
  263. *
  264. * @access public
  265. * @since Log 1.7.0
  266. */
  267. function alert($message)
  268. {
  269. return $this->log($message, PEAR_LOG_ALERT);
  270. }
  271. /**
  272. * A convenience function for logging a critical event. It will log a
  273. * message at the PEAR_LOG_CRIT log level.
  274. *
  275. * @param mixed $message String or object containing the message
  276. * to log.
  277. *
  278. * @return boolean True if the message was successfully logged.
  279. *
  280. * @access public
  281. * @since Log 1.7.0
  282. */
  283. function crit($message)
  284. {
  285. return $this->log($message, PEAR_LOG_CRIT);
  286. }
  287. /**
  288. * A convenience function for logging a error event. It will log a
  289. * message at the PEAR_LOG_ERR log level.
  290. *
  291. * @param mixed $message String or object containing the message
  292. * to log.
  293. *
  294. * @return boolean True if the message was successfully logged.
  295. *
  296. * @access public
  297. * @since Log 1.7.0
  298. */
  299. function err($message)
  300. {
  301. return $this->log($message, PEAR_LOG_ERR);
  302. }
  303. /**
  304. * A convenience function for logging a warning event. It will log a
  305. * message at the PEAR_LOG_WARNING log level.
  306. *
  307. * @param mixed $message String or object containing the message
  308. * to log.
  309. *
  310. * @return boolean True if the message was successfully logged.
  311. *
  312. * @access public
  313. * @since Log 1.7.0
  314. */
  315. function warning($message)
  316. {
  317. return $this->log($message, PEAR_LOG_WARNING);
  318. }
  319. /**
  320. * A convenience function for logging a notice event. It will log a
  321. * message at the PEAR_LOG_NOTICE log level.
  322. *
  323. * @param mixed $message String or object containing the message
  324. * to log.
  325. *
  326. * @return boolean True if the message was successfully logged.
  327. *
  328. * @access public
  329. * @since Log 1.7.0
  330. */
  331. function notice($message)
  332. {
  333. return $this->log($message, PEAR_LOG_NOTICE);
  334. }
  335. /**
  336. * A convenience function for logging a information event. It will log a
  337. * message at the PEAR_LOG_INFO log level.
  338. *
  339. * @param mixed $message String or object containing the message
  340. * to log.
  341. *
  342. * @return boolean True if the message was successfully logged.
  343. *
  344. * @access public
  345. * @since Log 1.7.0
  346. */
  347. function info($message)
  348. {
  349. return $this->log($message, PEAR_LOG_INFO);
  350. }
  351. /**
  352. * A convenience function for logging a debug event. It will log a
  353. * message at the PEAR_LOG_DEBUG log level.
  354. *
  355. * @param mixed $message String or object containing the message
  356. * to log.
  357. *
  358. * @return boolean True if the message was successfully logged.
  359. *
  360. * @access public
  361. * @since Log 1.7.0
  362. */
  363. function debug($message)
  364. {
  365. return $this->log($message, PEAR_LOG_DEBUG);
  366. }
  367. /**
  368. * Returns the string representation of the message data.
  369. *
  370. * If $message is an object, _extractMessage() will attempt to extract
  371. * the message text using a known method (such as a PEAR_Error object's
  372. * getMessage() method). If a known method, cannot be found, the
  373. * serialized representation of the object will be returned.
  374. *
  375. * If the message data is already a string, it will be returned unchanged.
  376. *
  377. * @param mixed $message The original message data. This may be a
  378. * string or any object.
  379. *
  380. * @return string The string representation of the message.
  381. *
  382. * @access protected
  383. */
  384. function _extractMessage($message)
  385. {
  386. /*
  387. * If we've been given an object, attempt to extract the message using
  388. * a known method. If we can't find such a method, default to the
  389. * "human-readable" version of the object.
  390. *
  391. * We also use the human-readable format for arrays.
  392. */
  393. if (is_object($message)) {
  394. if (method_exists($message, 'getmessage')) {
  395. $message = $message->getMessage();
  396. } else if (method_exists($message, 'tostring')) {
  397. $message = $message->toString();
  398. } else if (method_exists($message, '__tostring')) {
  399. if (version_compare(PHP_VERSION, '5.0.0', 'ge')) {
  400. $message = (string)$message;
  401. } else {
  402. $message = $message->__toString();
  403. }
  404. } else {
  405. $message = print_r($message, true);
  406. }
  407. } else if (is_array($message)) {
  408. if (isset($message['message'])) {
  409. $message = $message['message'];
  410. } else {
  411. $message = print_r($message, true);
  412. }
  413. }
  414. /* Otherwise, we assume the message is a string. */
  415. return $message;
  416. }
  417. /**
  418. * Using debug_backtrace(), returns the file, line, and enclosing function
  419. * name of the source code context from which log() was invoked.
  420. *
  421. * @param int $depth The initial number of frames we should step
  422. * back into the trace.
  423. *
  424. * @return array Array containing three strings: the filename, the line,
  425. * and the function name from which log() was called.
  426. *
  427. * @access private
  428. * @since Log 1.9.4
  429. */
  430. function _getBacktraceVars($depth)
  431. {
  432. /* Start by generating a backtrace from the current call (here). */
  433. $backtrace = debug_backtrace();
  434. /*
  435. * If we were ultimately invoked by the composite handler, we need to
  436. * increase our depth one additional level to compensate.
  437. */
  438. if (strcasecmp(@$backtrace[$depth+1]['class'], 'Log_composite') == 0) {
  439. $depth++;
  440. }
  441. /*
  442. * We're interested in the frame which invoked the log() function, so
  443. * we need to walk back some number of frames into the backtrace. The
  444. * $depth parameter tells us where to start looking. We go one step
  445. * further back to find the name of the encapsulating function from
  446. * which log() was called.
  447. */
  448. $file = @$backtrace[$depth]['file'];
  449. $line = @$backtrace[$depth]['line'];
  450. $func = @$backtrace[$depth + 1]['function'];
  451. /*
  452. * However, if log() was called from one of our "shortcut" functions,
  453. * we're going to need to go back an additional step.
  454. */
  455. if (in_array($func, array('emerg', 'alert', 'crit', 'err', 'warning',
  456. 'notice', 'info', 'debug'))) {
  457. $file = @$backtrace[$depth + 1]['file'];
  458. $line = @$backtrace[$depth + 1]['line'];
  459. $func = @$backtrace[$depth + 2]['function'];
  460. }
  461. /*
  462. * If we couldn't extract a function name (perhaps because we were
  463. * executed from the "main" context), provide a default value.
  464. */
  465. if (is_null($func)) {
  466. $func = '(none)';
  467. }
  468. /* Return a 3-tuple containing (file, line, function). */
  469. return array($file, $line, $func);
  470. }
  471. /**
  472. * Produces a formatted log line based on a format string and a set of
  473. * variables representing the current log record and state.
  474. *
  475. * @return string Formatted log string.
  476. *
  477. * @access protected
  478. * @since Log 1.9.4
  479. */
  480. function _format($format, $timestamp, $priority, $message)
  481. {
  482. /*
  483. * If the format string references any of the backtrace-driven
  484. * variables (%5, %6, %7), generate the backtrace and fetch them.
  485. */
  486. if (strpos($format, '%5') || strpos($format, '%6') || strpos($format, '%7')) {
  487. list($file, $line, $func) = $this->_getBacktraceVars(2);
  488. }
  489. /*
  490. * Build the formatted string. We use the sprintf() function's
  491. * "argument swapping" capability to dynamically select and position
  492. * the variables which will ultimately appear in the log string.
  493. */
  494. return sprintf($format,
  495. $timestamp,
  496. $this->_ident,
  497. $this->priorityToString($priority),
  498. $message,
  499. isset($file) ? $file : '',
  500. isset($line) ? $line : '',
  501. isset($func) ? $func : '');
  502. }
  503. /**
  504. * Returns the string representation of a PEAR_LOG_* integer constant.
  505. *
  506. * @param int $priority A PEAR_LOG_* integer constant.
  507. *
  508. * @return string The string representation of $level.
  509. *
  510. * @access public
  511. * @since Log 1.0
  512. */
  513. function priorityToString($priority)
  514. {
  515. $levels = array(
  516. PEAR_LOG_EMERG => 'emergency',
  517. PEAR_LOG_ALERT => 'alert',
  518. PEAR_LOG_CRIT => 'critical',
  519. PEAR_LOG_ERR => 'error',
  520. PEAR_LOG_WARNING => 'warning',
  521. PEAR_LOG_NOTICE => 'notice',
  522. PEAR_LOG_INFO => 'info',
  523. PEAR_LOG_DEBUG => 'debug'
  524. );
  525. return $levels[$priority];
  526. }
  527. /**
  528. * Returns the the PEAR_LOG_* integer constant for the given string
  529. * representation of a priority name. This function performs a
  530. * case-insensitive search.
  531. *
  532. * @param string $name String containing a priority name.
  533. *
  534. * @return string The PEAR_LOG_* integer contstant corresponding
  535. * the the specified priority name.
  536. *
  537. * @access public
  538. * @since Log 1.9.0
  539. */
  540. function stringToPriority($name)
  541. {
  542. $levels = array(
  543. 'emergency' => PEAR_LOG_EMERG,
  544. 'alert' => PEAR_LOG_ALERT,
  545. 'critical' => PEAR_LOG_CRIT,
  546. 'error' => PEAR_LOG_ERR,
  547. 'warning' => PEAR_LOG_WARNING,
  548. 'notice' => PEAR_LOG_NOTICE,
  549. 'info' => PEAR_LOG_INFO,
  550. 'debug' => PEAR_LOG_DEBUG
  551. );
  552. return $levels[strtolower($name)];
  553. }
  554. /**
  555. * Calculate the log mask for the given priority.
  556. *
  557. * This method may be called statically.
  558. *
  559. * @param integer $priority The priority whose mask will be calculated.
  560. *
  561. * @return integer The calculated log mask.
  562. *
  563. * @access public
  564. * @since Log 1.7.0
  565. */
  566. function MASK($priority)
  567. {
  568. return (1 << $priority);
  569. }
  570. /**
  571. * Calculate the log mask for all priorities up to the given priority.
  572. *
  573. * This method may be called statically.
  574. *
  575. * @param integer $priority The maximum priority covered by this mask.
  576. *
  577. * @return integer The resulting log mask.
  578. *
  579. * @access public
  580. * @since Log 1.7.0
  581. *
  582. * @deprecated deprecated since Log 1.9.4; use Log::MAX() instead
  583. */
  584. function UPTO($priority)
  585. {
  586. return Log::MAX($priority);
  587. }
  588. /**
  589. * Calculate the log mask for all priorities greater than or equal to the
  590. * given priority. In other words, $priority will be the lowest priority
  591. * matched by the resulting mask.
  592. *
  593. * This method may be called statically.
  594. *
  595. * @param integer $priority The minimum priority covered by this mask.
  596. *
  597. * @return integer The resulting log mask.
  598. *
  599. * @access public
  600. * @since Log 1.9.4
  601. */
  602. function MIN($priority)
  603. {
  604. return PEAR_LOG_ALL ^ ((1 << $priority) - 1);
  605. }
  606. /**
  607. * Calculate the log mask for all priorities less than or equal to the
  608. * given priority. In other words, $priority will be the highests priority
  609. * matched by the resulting mask.
  610. *
  611. * This method may be called statically.
  612. *
  613. * @param integer $priority The maximum priority covered by this mask.
  614. *
  615. * @return integer The resulting log mask.
  616. *
  617. * @access public
  618. * @since Log 1.9.4
  619. */
  620. function MAX($priority)
  621. {
  622. return ((1 << ($priority + 1)) - 1);
  623. }
  624. /**
  625. * Set and return the level mask for the current Log instance.
  626. *
  627. * @param integer $mask A bitwise mask of log levels.
  628. *
  629. * @return integer The current level mask.
  630. *
  631. * @access public
  632. * @since Log 1.7.0
  633. */
  634. function setMask($mask)
  635. {
  636. $this->_mask = $mask;
  637. return $this->_mask;
  638. }
  639. /**
  640. * Returns the current level mask.
  641. *
  642. * @return interger The current level mask.
  643. *
  644. * @access public
  645. * @since Log 1.7.0
  646. */
  647. function getMask()
  648. {
  649. return $this->_mask;
  650. }
  651. /**
  652. * Check if the given priority is included in the current level mask.
  653. *
  654. * @param integer $priority The priority to check.
  655. *
  656. * @return boolean True if the given priority is included in the current
  657. * log mask.
  658. *
  659. * @access protected
  660. * @since Log 1.7.0
  661. */
  662. function _isMasked($priority)
  663. {
  664. return (Log::MASK($priority) & $this->_mask);
  665. }
  666. /**
  667. * Returns the current default priority.
  668. *
  669. * @return integer The current default priority.
  670. *
  671. * @access public
  672. * @since Log 1.8.4
  673. */
  674. function getPriority()
  675. {
  676. return $this->_priority;
  677. }
  678. /**
  679. * Sets the default priority to the specified value.
  680. *
  681. * @param integer $priority The new default priority.
  682. *
  683. * @access public
  684. * @since Log 1.8.4
  685. */
  686. function setPriority($priority)
  687. {
  688. $this->_priority = $priority;
  689. }
  690. /**
  691. * Adds a Log_observer instance to the list of observers that are listening
  692. * for messages emitted by this Log instance.
  693. *
  694. * @param object $observer The Log_observer instance to attach as a
  695. * listener.
  696. *
  697. * @param boolean True if the observer is successfully attached.
  698. *
  699. * @access public
  700. * @since Log 1.0
  701. */
  702. function attach(&$observer)
  703. {
  704. if (!is_a($observer, 'Log_observer')) {
  705. return false;
  706. }
  707. $this->_listeners[$observer->_id] = &$observer;
  708. return true;
  709. }
  710. /**
  711. * Removes a Log_observer instance from the list of observers.
  712. *
  713. * @param object $observer The Log_observer instance to detach from
  714. * the list of listeners.
  715. *
  716. * @param boolean True if the observer is successfully detached.
  717. *
  718. * @access public
  719. * @since Log 1.0
  720. */
  721. function detach($observer)
  722. {
  723. if (!is_a($observer, 'Log_observer') ||
  724. !isset($this->_listeners[$observer->_id])) {
  725. return false;
  726. }
  727. unset($this->_listeners[$observer->_id]);
  728. return true;
  729. }
  730. /**
  731. * Informs each registered observer instance that a new message has been
  732. * logged.
  733. *
  734. * @param array $event A hash describing the log event.
  735. *
  736. * @access protected
  737. */
  738. function _announce($event)
  739. {
  740. foreach ($this->_listeners as $id => $listener) {
  741. if ($event['priority'] <= $this->_listeners[$id]->_priority) {
  742. $this->_listeners[$id]->notify($event);
  743. }
  744. }
  745. }
  746. /**
  747. * Indicates whether this is a composite class.
  748. *
  749. * @return boolean True if this is a composite class.
  750. *
  751. * @access public
  752. * @since Log 1.0
  753. */
  754. function isComposite()
  755. {
  756. return false;
  757. }
  758. /**
  759. * Sets this Log instance's identification string.
  760. *
  761. * @param string $ident The new identification string.
  762. *
  763. * @access public
  764. * @since Log 1.6.3
  765. */
  766. function setIdent($ident)
  767. {
  768. $this->_ident = $ident;
  769. }
  770. /**
  771. * Returns the current identification string.
  772. *
  773. * @return string The current Log instance's identification string.
  774. *
  775. * @access public
  776. * @since Log 1.6.3
  777. */
  778. function getIdent()
  779. {
  780. return $this->_ident;
  781. }
  782. }