cvs: pear /Log Log.php /Log/Log composite.php console.php file.php mcal.php sql.php syslog.php
| From: | Jon Parise | Date: | Mon, 29 Apr 2002 04:34:15 +0000 |
| Subject: | cvs: pear /Log Log.php /Log/Log composite.php console.php file.php mcal.php sql.php syslog.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-3611@lists.php.net to get a copy of this message | ||
jon Mon Apr 29 00:34:15 2002 EDT
Modified files:
/pear/Log Log.php
/pear/Log/Log composite.php console.php file.php mcal.php sql.php
syslog.php
Log:
Start prefixing private variables with a leading underscore. Some PHPDoc
comments were also updated to reflect the private nature of these members.
Index: pear/Log/Log.php diff -u pear/Log/Log.php:1.4 pear/Log/Log.php:1.5 --- pear/Log/Log.php:1.4 Mon Jan 21 12:23:32 2002 +++ pear/Log/Log.php Mon Apr 29 00:34:15 2002 @@ -1,5 +1,5 @@ <?php -// $Id: Log.php,v 1.4 2002/01/21 17:23:32 jon Exp $ +// $Id: Log.php,v 1.5 2002/04/29 04:34:15 jon Exp $ // $Horde: horde/lib/Log.php,v 1.15 2000/06/29 23:39:45 jon Exp $ /** @@ -8,31 +8,35 @@ * * @author Chuck Hagenbuch <chuck@horde.org> * @author Jon Parise <jon@horde.org> - * @version $Revision: 1.4 $ + * @version $Revision: 1.5 $ * @since Horde 1.3 * @package Log */ class Log { /** - * indicating whether or not the log connection is currently open. - * @var boolean - */ - var $opened = false; + * Indicates whether or not the log can been opened / connected. + * + * @var boolean + * @access private + */ + var $_opened = false; /** - * holding the identifier - * that will be stored along with each logged message. - * @var string - */ - var $ident = ''; + * The label that uniquely identifies this set of log messages. + * + * @var string + * @access private + */ + var $_ident = ''; /** - * holding all Log_observer objects - * that wish to be notified of any messages that we handle. - * @var array - */ - var $listeners = array(); + * Holds all Log_observer objects that wish to be notified of new messages + * + * @var array + * @access private + */ + var $_listeners = array(); /** @@ -154,7 +158,7 @@ $logObserver->_listenerID = uniqid(rand()); - $this->listeners[$logObserver->_listenerID] = &$logObserver; + $this->_listeners[$logObserver->_listenerID] = &$logObserver; } /** @@ -167,8 +171,8 @@ */ function detach($logObserver) { - if (isset($this->listeners[$logObserver->_listenerID])) { - unset($this->listeners[$logObserver->_listenerID]); + if (isset($this->_listeners[$logObserver->_listenerID])) { + unset($this->_listeners[$logObserver->_listenerID]); } } @@ -182,8 +186,8 @@ */ function notifyAll($messageOb) { - reset($this->listeners); - foreach ($this->listeners as $listener) { + reset($this->_listeners); + foreach ($this->_listeners as $listener) { if ($messageOb['priority'] <= $listener->priority) { $listener->notify($messageOb); } Index: pear/Log/Log/composite.php diff -u pear/Log/Log/composite.php:1.1 pear/Log/Log/composite.php:1.2 --- pear/Log/Log/composite.php:1.1 Thu Mar 7 19:08:21 2002 +++ pear/Log/Log/composite.php Mon Apr 29 00:34:15 2002 @@ -1,5 +1,5 @@ <?php -// $Id: composite.php,v 1.1 2002/03/08 00:08:21 jon Exp $ +// $Id: composite.php,v 1.2 2002/04/29 04:34:15 jon Exp $ // $Horde: horde/lib/Log/composite.php,v 1.2 2000/06/28 21:36:13 jon Exp $ /** @@ -7,7 +7,7 @@ * allows multiple Log implementations to get sent the same events. * * @author Chuck Hagenbuch <chuck@horde.org> - * @version $Revision: 1.1 $ + * @version $Revision: 1.2 $ * @since Horde 1.3 * @package Log */ @@ -41,7 +41,7 @@ */ function open() { - if (!$this->opened) { + if (!$this->_opened) { reset($this->children); foreach ($this->children as $child) { $child->open(); @@ -56,7 +56,7 @@ */ function close() { - if ($this->opened) { + if ($this->_opened) { reset($this->children); foreach ($this->children as $child) { $child->close(); Index: pear/Log/Log/console.php diff -u pear/Log/Log/console.php:1.1 pear/Log/Log/console.php:1.2 --- pear/Log/Log/console.php:1.1 Fri Apr 12 20:33:00 2002 +++ pear/Log/Log/console.php Mon Apr 29 00:34:15 2002 @@ -1,12 +1,12 @@ <?php -// $Id: console.php,v 1.1 2002/04/13 00:33:00 jon Exp $ +// $Id: console.php,v 1.2 2002/04/29 04:34:15 jon Exp $ /** * The Log_console class is a concrete implementation of the Log:: * abstract class which writes message to the text console. * * @author Jon Parise <jon@php.net> - * @version $Revision: 1.1 $ + * @version $Revision: 1.2 $ * @package Log */ class Log_console extends Log @@ -21,7 +21,7 @@ */ function Log_console($log_name, $ident = '', $conf = array()) { - $this->ident = $ident; + $this->_ident = $ident; } /** @@ -37,7 +37,7 @@ */ function log($message, $priority = LOG_INFO) { - printf("%s %s [%s] %s\n", strftime('%b %d %T'), $this->ident, + printf("%s %s [%s] %s\n", strftime('%b %d %T'), $this->_ident, Log::priorityToString($priority), $message); $this->notifyAll(array('priority' => $priority, 'message' => $message)); Index: pear/Log/Log/file.php diff -u pear/Log/Log/file.php:1.1 pear/Log/Log/file.php:1.2 --- pear/Log/Log/file.php:1.1 Thu Mar 7 19:08:21 2002 +++ pear/Log/Log/file.php Mon Apr 29 00:34:15 2002 @@ -1,5 +1,5 @@ <?php -// $Id: file.php,v 1.1 2002/03/08 00:08:21 jon Exp $ +// $Id: file.php,v 1.2 2002/04/29 04:34:15 jon Exp $ // $Horde: horde/lib/Log/file.php,v 1.4 2000/06/28 21:36:13 jon Exp $ /** @@ -7,7 +7,7 @@ * abstract class which writes message to a text file. * * @author Jon Parise <jon@horde.org> - * @version $Revision: 1.1 $ + * @version $Revision: 1.2 $ * @since Horde 1.3 * @package Log */ @@ -41,7 +41,7 @@ $conf = false ; } $this->filename = $log_name; - $this->ident = $ident; + $this->_ident = $ident; } /** @@ -52,9 +52,9 @@ */ function open() { - if (!$this->opened) { + if (!$this->_opened) { $this->fp = fopen($this->filename, 'a'); - $this->opened = true; + $this->_opened = true; } } @@ -64,9 +64,9 @@ */ function close() { - if ($this->opened) { + if ($this->_opened) { fclose($this->fp); - $this->opened = false; + $this->_opened = false; } } @@ -84,12 +84,12 @@ */ function log($message, $priority = LOG_INFO) { - if (!$this->opened) { + if (!$this->_opened) { $this->open(); } $entry = sprintf("%s %s [%s] %s\n", strftime('%b %d %T'), - $this->ident, Log::priorityToString($priority), $message); + $this->_ident, Log::priorityToString($priority), $message); if ($this->fp) { fwrite($this->fp, $entry); Index: pear/Log/Log/mcal.php diff -u pear/Log/Log/mcal.php:1.1 pear/Log/Log/mcal.php:1.2 --- pear/Log/Log/mcal.php:1.1 Thu Mar 7 19:08:21 2002 +++ pear/Log/Log/mcal.php Mon Apr 29 00:34:15 2002 @@ -1,5 +1,5 @@ <?php -// $Id: mcal.php,v 1.1 2002/03/08 00:08:21 jon Exp $ +// $Id: mcal.php,v 1.2 2002/04/29 04:34:15 jon Exp $ // $Horde: horde/lib/Log/mcal.php,v 1.2 2000/06/28 21:36:13 jon Exp $ /** @@ -8,7 +8,7 @@ * store accessed through MCAL. * * @author Chuck Hagenbuch <chuck@horde.org> - * @version $Revision: 1.1 $ + * @version $Revision: 1.2 $ * @since Horde 1.3 * @package Log */ @@ -66,7 +66,7 @@ $conf = false ; } $this->name = $log_name; - $this->ident = $ident; + $this->_ident = $ident; $this->calendar = $conf['calendar']; $this->username = $conf['username']; $this->password = $conf['password']; @@ -80,9 +80,9 @@ */ function open() { - if (!$this->opened) { + if (!$this->_opened) { $this->stream = mcal_open($this->calendar, $this->username, $this->password, $this->options); - $this->opened = true; + $this->_opened = true; } } @@ -92,9 +92,9 @@ */ function close() { - if ($this->opened) { + if ($this->_opened) { mcal_close($this->stream); - $this->opened = false; + $this->_opened = false; } } @@ -113,7 +113,7 @@ */ function log($message, $priority = LOG_INFO) { - if (!$this->opened) { + if (!$this->_opened) { $this->open(); } @@ -121,7 +121,7 @@ $dates = explode(':', $date_str); mcal_event_init($this->stream); - mcal_event_set_title($this->stream, $this->ident); + mcal_event_set_title($this->stream, $this->_ident); mcal_event_set_category($this->stream, $this->name); mcal_event_set_description($this->stream, $message); mcal_event_add_attribute($this->stream, 'priority', $priority); Index: pear/Log/Log/sql.php diff -u pear/Log/Log/sql.php:1.1 pear/Log/Log/sql.php:1.2 --- pear/Log/Log/sql.php:1.1 Thu Mar 7 19:08:21 2002 +++ pear/Log/Log/sql.php Mon Apr 29 00:34:15 2002 @@ -1,5 +1,5 @@ <?php -// $Id: sql.php,v 1.1 2002/03/08 00:08:21 jon Exp $ +// $Id: sql.php,v 1.2 2002/04/29 04:34:15 jon Exp $ // $Horde: horde/lib/Log/sql.php,v 1.12 2000/08/16 20:27:34 chuck Exp $ require_once 'DB.php'; @@ -20,7 +20,7 @@ * ); * * @author Jon Parise <jon@horde.org> - * @version $Revision: 1.1 $ + * @version $Revision: 1.2 $ * @since Horde 1.3 * @package Log */ @@ -44,12 +44,6 @@ */ var $table = 'log_table'; - /** - * Boolean indicating the current connection state. - * @var boolean - */ - var $opened = false; - /** * Constructs a new sql logging object. @@ -62,7 +56,7 @@ function Log_sql($log_name, $ident = '', $conf) { $this->table = $log_name; - $this->ident = $ident; + $this->_ident = $ident; $this->dsn = $conf['dsn']; } @@ -75,12 +69,12 @@ */ function open() { - if (!$this->opened) { + if (!$this->_opened) { $this->db = &DB::connect($this->dsn, true); if (DB::isError($this->db) || DB::isWarning($this->db)) { return false; } - $this->opened = true; + $this->_opened = true; } return true; @@ -94,8 +88,8 @@ */ function close() { - if ($this->opened) { - $this->opened = false; + if ($this->_opened) { + $this->_opened = false; return $this->db->disconnect(); } @@ -116,13 +110,13 @@ */ function log($message, $priority = LOG_INFO) { - if (!$this->opened) { + if (!$this->_opened) { $this->open(); } $timestamp = time(); $q = "insert into $this->table - values($timestamp, '$this->ident', $priority, '$message')"; + values($timestamp, '$this->_ident', $priority, '$message')"; $this->db->query($q); $this->notifyAll(array('priority' => $priority, 'message' => $message)); } Index: pear/Log/Log/syslog.php diff -u pear/Log/Log/syslog.php:1.1 pear/Log/Log/syslog.php:1.2 --- pear/Log/Log/syslog.php:1.1 Thu Mar 7 19:08:21 2002 +++ pear/Log/Log/syslog.php Mon Apr 29 00:34:15 2002 @@ -1,5 +1,5 @@ <?php -// $Id: syslog.php,v 1.1 2002/03/08 00:08:21 jon Exp $ +// $Id: syslog.php,v 1.2 2002/04/29 04:34:15 jon Exp $ // $Horde: horde/lib/Log/syslog.php,v 1.6 2000/06/28 21:36:13 jon Exp $ /** @@ -8,7 +8,7 @@ * (PHP emulates this with the Event Log on Windows machines). * * @author Chuck Hagenbuch <chuck@horde.org> - * @version $Revision: 1.1 $ + * @version $Revision: 1.2 $ * @since Horde 1.3 * @package Log */ @@ -36,7 +36,7 @@ $conf = false ; } $this->name = $log_name; - $this->ident = $ident; + $this->_ident = $ident; } /** @@ -46,9 +46,9 @@ */ function open() { - if (!$this->opened) { - openlog($this->ident, LOG_PID, $this->name); - $this->opened = true; + if (!$this->_opened) { + openlog($this->_ident, LOG_PID, $this->name); + $this->_opened = true; } } @@ -58,9 +58,9 @@ */ function close() { - if ($this->opened) { + if ($this->_opened) { closelog(); - $this->opened = false; + $this->_opened = false; } } @@ -78,7 +78,7 @@ */ function log($message, $priority = LOG_INFO) { - if (!$this->opened) { + if (!$this->_opened) { $this->open(); }
Index: pear/Log/Log.php diff -u pear/Log/Log.php:1.4 pear/Log/Log.php:1.5 --- pear/Log/Log.php:1.4 Mon Jan 21 12:23:32 2002 +++ pear/Log/Log.php Mon Apr 29 00:34:15 2002 @@ -1,5 +1,5 @@ <?php -// $Id: Log.php,v 1.4 2002/01/21 17:23:32 jon Exp $ +// $Id: Log.php,v 1.5 2002/04/29 04:34:15 jon Exp $ // $Horde: horde/lib/Log.php,v 1.15 2000/06/29 23:39:45 jon Exp $ /** @@ -8,31 +8,35 @@ * * @author Chuck Hagenbuch <chuck@horde.org> * @author Jon Parise <jon@horde.org> - * @version $Revision: 1.4 $ + * @version $Revision: 1.5 $ * @since Horde 1.3 * @package Log */ class Log { /** - * indicating whether or not the log connection is currently open. - * @var boolean - */ - var $opened = false; + * Indicates whether or not the log can been opened / connected. + * + * @var boolean + * @access private + */ + var $_opened = false; /** - * holding the identifier - * that will be stored along with each logged message. - * @var string - */ - var $ident = ''; + * The label that uniquely identifies this set of log messages. + * + * @var string + * @access private + */ + var $_ident = ''; /** - * holding all Log_observer objects - * that wish to be notified of any messages that we handle. - * @var array - */ - var $listeners = array(); + * Holds all Log_observer objects that wish to be notified of new messages + * + * @var array + * @access private + */ + var $_listeners = array(); /** @@ -154,7 +158,7 @@ $logObserver->_listenerID = uniqid(rand()); - $this->listeners[$logObserver->_listenerID] = &$logObserver; + $this->_listeners[$logObserver->_listenerID] = &$logObserver; } /** @@ -167,8 +171,8 @@ */ function detach($logObserver) { - if (isset($this->listeners[$logObserver->_listenerID])) { - unset($this->listeners[$logObserver->_listenerID]); + if (isset($this->_listeners[$logObserver->_listenerID])) { + unset($this->_listeners[$logObserver->_listenerID]); } } @@ -182,8 +186,8 @@ */ function notifyAll($messageOb) { - reset($this->listeners); - foreach ($this->listeners as $listener) { + reset($this->_listeners); + foreach ($this->_listeners as $listener) { if ($messageOb['priority'] <= $listener->priority) { $listener->notify($messageOb); } Index: pear/Log/Log/composite.php diff -u pear/Log/Log/composite.php:1.1 pear/Log/Log/composite.php:1.2 --- pear/Log/Log/composite.php:1.1 Thu Mar 7 19:08:21 2002 +++ pear/Log/Log/composite.php Mon Apr 29 00:34:15 2002 @@ -1,5 +1,5 @@ <?php -// $Id: composite.php,v 1.1 2002/03/08 00:08:21 jon Exp $ +// $Id: composite.php,v 1.2 2002/04/29 04:34:15 jon Exp $ // $Horde: horde/lib/Log/composite.php,v 1.2 2000/06/28 21:36:13 jon Exp $ /** @@ -7,7 +7,7 @@ * allows multiple Log implementations to get sent the same events. * * @author Chuck Hagenbuch <chuck@horde.org> - * @version $Revision: 1.1 $ + * @version $Revision: 1.2 $ * @since Horde 1.3 * @package Log */ @@ -41,7 +41,7 @@ */ function open() { - if (!$this->opened) { + if (!$this->_opened) { reset($this->children); foreach ($this->children as $child) { $child->open(); @@ -56,7 +56,7 @@ */ function close() { - if ($this->opened) { + if ($this->_opened) { reset($this->children); foreach ($this->children as $child) { $child->close(); Index: pear/Log/Log/console.php diff -u pear/Log/Log/console.php:1.1 pear/Log/Log/console.php:1.2 --- pear/Log/Log/console.php:1.1 Fri Apr 12 20:33:00 2002 +++ pear/Log/Log/console.php Mon Apr 29 00:34:15 2002 @@ -1,12 +1,12 @@ <?php -// $Id: console.php,v 1.1 2002/04/13 00:33:00 jon Exp $ +// $Id: console.php,v 1.2 2002/04/29 04:34:15 jon Exp $ /** * The Log_console class is a concrete implementation of the Log:: * abstract class which writes message to the text console. * * @author Jon Parise <jon@php.net> - * @version $Revision: 1.1 $ + * @version $Revision: 1.2 $ * @package Log */ class Log_console extends Log @@ -21,7 +21,7 @@ */ function Log_console($log_name, $ident = '', $conf = array()) { - $this->ident = $ident; + $this->_ident = $ident; } /** @@ -37,7 +37,7 @@ */ function log($message, $priority = LOG_INFO) { - printf("%s %s [%s] %s\n", strftime('%b %d %T'), $this->ident, + printf("%s %s [%s] %s\n", strftime('%b %d %T'), $this->_ident, Log::priorityToString($priority), $message); $this->notifyAll(array('priority' => $priority, 'message' => $message)); Index: pear/Log/Log/file.php diff -u pear/Log/Log/file.php:1.1 pear/Log/Log/file.php:1.2 --- pear/Log/Log/file.php:1.1 Thu Mar 7 19:08:21 2002 +++ pear/Log/Log/file.php Mon Apr 29 00:34:15 2002 @@ -1,5 +1,5 @@ <?php -// $Id: file.php,v 1.1 2002/03/08 00:08:21 jon Exp $ +// $Id: file.php,v 1.2 2002/04/29 04:34:15 jon Exp $ // $Horde: horde/lib/Log/file.php,v 1.4 2000/06/28 21:36:13 jon Exp $ /** @@ -7,7 +7,7 @@ * abstract class which writes message to a text file. * * @author Jon Parise <jon@horde.org> - * @version $Revision: 1.1 $ + * @version $Revision: 1.2 $ * @since Horde 1.3 * @package Log */ @@ -41,7 +41,7 @@ $conf = false ; } $this->filename = $log_name; - $this->ident = $ident; + $this->_ident = $ident; } /** @@ -52,9 +52,9 @@ */ function open() { - if (!$this->opened) { + if (!$this->_opened) { $this->fp = fopen($this->filename, 'a'); - $this->opened = true; + $this->_opened = true; } } @@ -64,9 +64,9 @@ */ function close() { - if ($this->opened) { + if ($this->_opened) { fclose($this->fp); - $this->opened = false; + $this->_opened = false; } } @@ -84,12 +84,12 @@ */ function log($message, $priority = LOG_INFO) { - if (!$this->opened) { + if (!$this->_opened) { $this->open(); } $entry = sprintf("%s %s [%s] %s\n", strftime('%b %d %T'), - $this->ident, Log::priorityToString($priority), $message); + $this->_ident, Log::priorityToString($priority), $message); if ($this->fp) { fwrite($this->fp, $entry); Index: pear/Log/Log/mcal.php diff -u pear/Log/Log/mcal.php:1.1 pear/Log/Log/mcal.php:1.2 --- pear/Log/Log/mcal.php:1.1 Thu Mar 7 19:08:21 2002 +++ pear/Log/Log/mcal.php Mon Apr 29 00:34:15 2002 @@ -1,5 +1,5 @@ <?php -// $Id: mcal.php,v 1.1 2002/03/08 00:08:21 jon Exp $ +// $Id: mcal.php,v 1.2 2002/04/29 04:34:15 jon Exp $ // $Horde: horde/lib/Log/mcal.php,v 1.2 2000/06/28 21:36:13 jon Exp $ /** @@ -8,7 +8,7 @@ * store accessed through MCAL. * * @author Chuck Hagenbuch <chuck@horde.org> - * @version $Revision: 1.1 $ + * @version $Revision: 1.2 $ * @since Horde 1.3 * @package Log */ @@ -66,7 +66,7 @@ $conf = false ; } $this->name = $log_name; - $this->ident = $ident; + $this->_ident = $ident; $this->calendar = $conf['calendar']; $this->username = $conf['username']; $this->password = $conf['password']; @@ -80,9 +80,9 @@ */ function open() { - if (!$this->opened) { + if (!$this->_opened) { $this->stream = mcal_open($this->calendar, $this->username, $this->password, $this->options); - $this->opened = true; + $this->_opened = true; } } @@ -92,9 +92,9 @@ */ function close() { - if ($this->opened) { + if ($this->_opened) { mcal_close($this->stream); - $this->opened = false; + $this->_opened = false; } } @@ -113,7 +113,7 @@ */ function log($message, $priority = LOG_INFO) { - if (!$this->opened) { + if (!$this->_opened) { $this->open(); } @@ -121,7 +121,7 @@ $dates = explode(':', $date_str); mcal_event_init($this->stream); - mcal_event_set_title($this->stream, $this->ident); + mcal_event_set_title($this->stream, $this->_ident); mcal_event_set_category($this->stream, $this->name); mcal_event_set_description($this->stream, $message); mcal_event_add_attribute($this->stream, 'priority', $priority); Index: pear/Log/Log/sql.php diff -u pear/Log/Log/sql.php:1.1 pear/Log/Log/sql.php:1.2 --- pear/Log/Log/sql.php:1.1 Thu Mar 7 19:08:21 2002 +++ pear/Log/Log/sql.php Mon Apr 29 00:34:15 2002 @@ -1,5 +1,5 @@ <?php -// $Id: sql.php,v 1.1 2002/03/08 00:08:21 jon Exp $ +// $Id: sql.php,v 1.2 2002/04/29 04:34:15 jon Exp $ // $Horde: horde/lib/Log/sql.php,v 1.12 2000/08/16 20:27:34 chuck Exp $ require_once 'DB.php'; @@ -20,7 +20,7 @@ * ); * * @author Jon Parise <jon@horde.org> - * @version $Revision: 1.1 $ + * @version $Revision: 1.2 $ * @since Horde 1.3 * @package Log */ @@ -44,12 +44,6 @@ */ var $table = 'log_table'; - /** - * Boolean indicating the current connection state. - * @var boolean - */ - var $opened = false; - /** * Constructs a new sql logging object. @@ -62,7 +56,7 @@ function Log_sql($log_name, $ident = '', $conf) { $this->table = $log_name; - $this->ident = $ident; + $this->_ident = $ident; $this->dsn = $conf['dsn']; } @@ -75,12 +69,12 @@ */ function open() { - if (!$this->opened) { + if (!$this->_opened) { $this->db = &DB::connect($this->dsn, true); if (DB::isError($this->db) || DB::isWarning($this->db)) { return false; } - $this->opened = true; + $this->_opened = true; } return true; @@ -94,8 +88,8 @@ */ function close() { - if ($this->opened) { - $this->opened = false; + if ($this->_opened) { + $this->_opened = false; return $this->db->disconnect(); } @@ -116,13 +110,13 @@ */ function log($message, $priority = LOG_INFO) { - if (!$this->opened) { + if (!$this->_opened) { $this->open(); } $timestamp = time(); $q = "insert into $this->table - values($timestamp, '$this->ident', $priority, '$message')"; + values($timestamp, '$this->_ident', $priority, '$message')"; $this->db->query($q); $this->notifyAll(array('priority' => $priority, 'message' => $message)); } Index: pear/Log/Log/syslog.php diff -u pear/Log/Log/syslog.php:1.1 pear/Log/Log/syslog.php:1.2 --- pear/Log/Log/syslog.php:1.1 Thu Mar 7 19:08:21 2002 +++ pear/Log/Log/syslog.php Mon Apr 29 00:34:15 2002 @@ -1,5 +1,5 @@ <?php -// $Id: syslog.php,v 1.1 2002/03/08 00:08:21 jon Exp $ +// $Id: syslog.php,v 1.2 2002/04/29 04:34:15 jon Exp $ // $Horde: horde/lib/Log/syslog.php,v 1.6 2000/06/28 21:36:13 jon Exp $ /** @@ -8,7 +8,7 @@ * (PHP emulates this with the Event Log on Windows machines). * * @author Chuck Hagenbuch <chuck@horde.org> - * @version $Revision: 1.1 $ + * @version $Revision: 1.2 $ * @since Horde 1.3 * @package Log */ @@ -36,7 +36,7 @@ $conf = false ; } $this->name = $log_name; - $this->ident = $ident; + $this->_ident = $ident; } /** @@ -46,9 +46,9 @@ */ function open() { - if (!$this->opened) { - openlog($this->ident, LOG_PID, $this->name); - $this->opened = true; + if (!$this->_opened) { + openlog($this->_ident, LOG_PID, $this->name); + $this->_opened = true; } } @@ -58,9 +58,9 @@ */ function close() { - if ($this->opened) { + if ($this->_opened) { closelog(); - $this->opened = false; + $this->_opened = false; } } @@ -78,7 +78,7 @@ */ function log($message, $priority = LOG_INFO) { - if (!$this->opened) { + if (!$this->_opened) { $this->open(); }