cvs: pear /Log Log.php /Log/Log composite.php console.php file.php mcal.php sql.php syslog.php

From: Date: Mon, 29 Apr 2002 04:52:22 +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-3613@lists.php.net to get a copy of this message
jon Mon Apr 29 00:52:22 2002 EDT Modified files: /pear/Log Log.php /pear/Log/Log composite.php console.php file.php mcal.php sql.php syslog.php Log: Remove the log_ prefix from construction parameters.

Index: pear/Log/Log.php diff -u pear/Log/Log.php:1.6 pear/Log/Log.php:1.7 --- pear/Log/Log.php:1.6 Mon Apr 29 00:43:11 2002 +++ pear/Log/Log.php Mon Apr 29 00:52:21 2002 @@ -1,5 +1,5 @@ <?php -// $Id: Log.php,v 1.6 2002/04/29 04:43:11 jon Exp $ +// $Id: Log.php,v 1.7 2002/04/29 04:52:21 jon Exp $ // $Horde: horde/lib/Log.php,v 1.15 2000/06/29 23:39:45 jon Exp $ /** @@ -8,7 +8,7 @@ * * @author Chuck Hagenbuch <chuck@horde.org> * @author Jon Parise <jon@horde.org> - * @version $Revision: 1.6 $ + * @version $Revision: 1.7 $ * @since Horde 1.3 * @package Log */ @@ -40,14 +40,14 @@ /** - * Attempts to return a concrete Log instance of $log_type. + * Attempts to return a concrete Log instance of $type. * - * @param string $log_type The type of concrete Log subclass to return. + * @param string $type The type of concrete Log subclass to return. * Attempt to dynamically include the code for * this subclass. Currently, valid values are * 'console', 'syslog', 'sql', 'file', and 'mcal'. * - * @param string $log_name The name of the actually log file, table, or + * @param string $name The name of the actually log file, table, or * other specific store to use. Defaults to an * empty string, with which the subclass will * attempt to do something intelligent. @@ -61,21 +61,21 @@ * false on an error. * @access public */ - function factory($log_type, $log_name = '', $ident = '', $conf = array()) + function factory($type, $name = '', $ident = '', $conf = array()) { - $log_type = strtolower($log_type); - $classfile = 'Log/' . $log_type . '.php'; + $type = strtolower($type); + $classfile = 'Log/' . $type . '.php'; if (@include_once $classfile) { - $class = 'Log_' . $log_type; - return new $class($log_name, $ident, $conf); + $class = 'Log_' . $type; + return new $class($name, $ident, $conf); } else { return false; } } /** - * Attempts to return a reference to a concrete Log instance of $log_type, - * only creating a new instance if no log instance with the same parameters + * Attempts to return a reference to a concrete Log instance of $type, only + * creating a new instance if no log instance with the same parameters * currently exists. * * You should use this if there are multiple places you might create a @@ -87,12 +87,12 @@ * Without the ampersand (&) in front of the method name, you will not get * a reference, you will get a copy.</b> * - * @param string $log_type The type of concrete Log subclass to return. + * @param string $type The type of concrete Log subclass to return. * Attempt to dynamically include the code for * this subclass. Currently, valid values are * 'console', 'syslog', 'sql', 'file', and 'mcal'. * - * @param string $log_name The name of the actually log file, table, or + * @param string $name The name of the actually log file, table, or * other specific store to use. Defaults to an * empty string, with which the subclass will * attempt to do something intelligent. @@ -106,14 +106,14 @@ * false on an error. * @access public */ - function &singleton($log_type, $log_name = '', $ident = '', $conf = array()) + function &singleton($type, $name = '', $ident = '', $conf = array()) { static $instances; if (!isset($instances)) $instances = array(); - $signature = md5($log_type . '][' . $log_name . '][' . $ident . '][' . implode('][', $conf)); + $signature = md5($type . '][' . $name . '][' . $ident . '][' . implode('][', $conf)); if (!isset($instances[$signature])) { - $instances[$signature] = Log::factory($log_type, $log_name, $ident, $conf); + $instances[$signature] = Log::factory($type, $name, $ident, $conf); } return $instances[$signature]; @@ -178,8 +178,8 @@ } /** - * Sends any Log_observer objects listening to this Log the message - * that was just logged. + * Sends any Log_observer objects listening to this Log the message that + * was just logged. * * @param array $msgObj The data structure holding all relevant log * information - the message, the priority, what Index: pear/Log/Log/composite.php diff -u pear/Log/Log/composite.php:1.2 pear/Log/Log/composite.php:1.3 --- pear/Log/Log/composite.php:1.2 Mon Apr 29 00:34:15 2002 +++ pear/Log/Log/composite.php Mon Apr 29 00:52:22 2002 @@ -1,5 +1,5 @@ <?php -// $Id: composite.php,v 1.2 2002/04/29 04:34:15 jon Exp $ +// $Id: composite.php,v 1.3 2002/04/29 04:52:22 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.2 $ + * @version $Revision: 1.3 $ * @since Horde 1.3 * @package Log */ @@ -25,12 +25,12 @@ /** * Constructs a new composite Log object. * - * @param boolean $log_name This is ignored. + * @param boolean $name This is ignored. * @param boolean $ident This is ignored. * @param boolean $conf This is ignored. * @access public */ - function Log_composite($log_name = false, $ident = false, $conf = false) + function Log_composite($name = false, $ident = false, $conf = false) { } Index: pear/Log/Log/console.php diff -u pear/Log/Log/console.php:1.2 pear/Log/Log/console.php:1.3 --- pear/Log/Log/console.php:1.2 Mon Apr 29 00:34:15 2002 +++ pear/Log/Log/console.php Mon Apr 29 00:52:22 2002 @@ -1,12 +1,12 @@ <?php -// $Id: console.php,v 1.2 2002/04/29 04:34:15 jon Exp $ +// $Id: console.php,v 1.3 2002/04/29 04:52:22 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.2 $ + * @version $Revision: 1.3 $ * @package Log */ class Log_console extends Log @@ -14,12 +14,12 @@ /** * Constructs a new Log_console object. * - * @param string $log_name Ignored. + * @param string $name Ignored. * @param string $ident The identity string. * @param array $conf The configuration array. * @access public */ - function Log_console($log_name, $ident = '', $conf = array()) + function Log_console($name, $ident = '', $conf = array()) { $this->_ident = $ident; } Index: pear/Log/Log/file.php diff -u pear/Log/Log/file.php:1.2 pear/Log/Log/file.php:1.3 --- pear/Log/Log/file.php:1.2 Mon Apr 29 00:34:15 2002 +++ pear/Log/Log/file.php Mon Apr 29 00:52:22 2002 @@ -1,5 +1,5 @@ <?php -// $Id: file.php,v 1.2 2002/04/29 04:34:15 jon Exp $ +// $Id: file.php,v 1.3 2002/04/29 04:52:22 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.2 $ + * @version $Revision: 1.3 $ * @since Horde 1.3 * @package Log */ @@ -29,18 +29,18 @@ /** * Constructs a new logfile object. * - * @param string $log_name The filename of the logfile. + * @param string $name The filename of the logfile. * @param string $ident The identity string. * @param array $conf The configuration array. * @access public */ - function Log_file($log_name, $ident = '', $conf = array()) + function Log_file($name, $ident = '', $conf = array()) { // bc compatibilty if( 0 == count( $conf )) { $conf = false ; } - $this->filename = $log_name; + $this->filename = $name; $this->_ident = $ident; } Index: pear/Log/Log/mcal.php diff -u pear/Log/Log/mcal.php:1.2 pear/Log/Log/mcal.php:1.3 --- pear/Log/Log/mcal.php:1.2 Mon Apr 29 00:34:15 2002 +++ pear/Log/Log/mcal.php Mon Apr 29 00:52:22 2002 @@ -1,5 +1,5 @@ <?php -// $Id: mcal.php,v 1.2 2002/04/29 04:34:15 jon Exp $ +// $Id: mcal.php,v 1.3 2002/04/29 04:52:22 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.2 $ + * @version $Revision: 1.3 $ * @since Horde 1.3 * @package Log */ @@ -54,18 +54,18 @@ /** * Constructs a new Log_mcal object. * - * @param string $log_name The category to use for our events. + * @param string $name The category to use for our events. * @param string $ident The identity string. * @param array $conf The configuration array. * @access public */ - function Log_mcal($log_name = LOG_SYSLOG, $ident = '', $conf = array()) + function Log_mcal($name, $ident = '', $conf = array()) { // bc compatibilty if( 0 == count( $conf )) { $conf = false ; } - $this->name = $log_name; + $this->name = $name; $this->_ident = $ident; $this->calendar = $conf['calendar']; $this->username = $conf['username']; Index: pear/Log/Log/sql.php diff -u pear/Log/Log/sql.php:1.2 pear/Log/Log/sql.php:1.3 --- pear/Log/Log/sql.php:1.2 Mon Apr 29 00:34:15 2002 +++ pear/Log/Log/sql.php Mon Apr 29 00:52:22 2002 @@ -1,5 +1,5 @@ <?php -// $Id: sql.php,v 1.2 2002/04/29 04:34:15 jon Exp $ +// $Id: sql.php,v 1.3 2002/04/29 04:52:22 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.2 $ + * @version $Revision: 1.3 $ * @since Horde 1.3 * @package Log */ @@ -48,14 +48,14 @@ /** * Constructs a new sql logging object. * - * @param string $log_name The target SQL table. + * @param string $name The target SQL table. * @param string $ident The identification field. * @param array $conf The connection configuration array. * @access public */ - function Log_sql($log_name, $ident = '', $conf) + function Log_sql($name, $ident = '', $conf) { - $this->table = $log_name; + $this->table = $name; $this->_ident = $ident; $this->dsn = $conf['dsn']; } Index: pear/Log/Log/syslog.php diff -u pear/Log/Log/syslog.php:1.2 pear/Log/Log/syslog.php:1.3 --- pear/Log/Log/syslog.php:1.2 Mon Apr 29 00:34:15 2002 +++ pear/Log/Log/syslog.php Mon Apr 29 00:52:22 2002 @@ -1,5 +1,5 @@ <?php -// $Id: syslog.php,v 1.2 2002/04/29 04:34:15 jon Exp $ +// $Id: syslog.php,v 1.3 2002/04/29 04:52:22 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.2 $ + * @version $Revision: 1.3 $ * @since Horde 1.3 * @package Log */ @@ -24,18 +24,18 @@ /** * Constructs a new syslog object. * - * @param string $log_name The syslog facility. + * @param string $name The syslog facility. * @param string $ident The identity string. * @param array $conf The configuration array. * @access public */ - function Log_syslog($log_name = LOG_SYSLOG, $ident = '', $conf = array()) + function Log_syslog($name, $ident = '', $conf = array()) { // bc compatibilty if( 0 == count( $conf )) { $conf = false ; } - $this->name = $log_name; + $this->name = $name; $this->_ident = $ident; }
« previous php.pear.cvs (#3613) next »