RE: [PEAR-DEV] Re: Log and locking
| From: | Richard Heyes | Date: | Sun, 22 Sep 2002 17:35:05 +0000 |
| Subject: | RE: [PEAR-DEV] Re: Log and locking | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-9312@lists.php.net to get a copy of this message | ||
> I've committed your file locking changes, but I don't have time to
> work on the above any time soon. If you'd like to work up a proof of
> concept container, I'd be glad to review / add it.
Attached is new file.php container and a diff to Log.php which is
required
for it to work, (unless you don't want Log to extend PEAR in which case
a few
Alterations to file.php would be necessary to include the call to
register_shudown_function()).
Cheers.
--
Richard Heyes
Index: Log.php =================================================================== RCS file: /repository/pear/Log/Log.php,v retrieving revision 1.10 diff -b -u -r1.10 Log.php --- Log.php 19 Sep 2002 01:42:36 -0000 1.10 +++ Log.php 22 Sep 2002 17:25:24 -0000 @@ -2,6 +2,8 @@ // $Id: Log.php,v 1.10 2002/09/19 01:42:36 jon Exp $ // $Horde: horde/lib/Log.php,v 1.15 2000/06/29 23:39:45 jon Exp $ +require_once('PEAR.php'); + define('PEAR_LOG_EMERG', 0); define('PEAR_LOG_ALERT', 1); define('PEAR_LOG_CRIT', 2); @@ -21,7 +23,7 @@ * @since Horde 1.3 * @package Log */ -class Log { +class Log extends PEAR { /** * Indicates whether or not the log can been opened / connected. @@ -80,7 +82,7 @@ * false on an error. * @access public */ - function factory($type, $name = '', $ident = '', $conf = array(), + function &factory($type, $name = '', $ident = '', $conf = array(), $maxLevel = PEAR_LOG_DEBUG) { $type = strtolower($type);
Index: Log.php =================================================================== RCS file: /repository/pear/Log/Log.php,v retrieving revision 1.10 diff -b -u -r1.10 Log.php --- Log.php 19 Sep 2002 01:42:36 -0000 1.10 +++ Log.php 22 Sep 2002 17:25:24 -0000 @@ -2,6 +2,8 @@ // $Id: Log.php,v 1.10 2002/09/19 01:42:36 jon Exp $ // $Horde: horde/lib/Log.php,v 1.15 2000/06/29 23:39:45 jon Exp $ +require_once('PEAR.php'); + define('PEAR_LOG_EMERG', 0); define('PEAR_LOG_ALERT', 1); define('PEAR_LOG_CRIT', 2); @@ -21,7 +23,7 @@ * @since Horde 1.3 * @package Log */ -class Log { +class Log extends PEAR { /** * Indicates whether or not the log can been opened / connected. @@ -80,7 +82,7 @@ * false on an error. * @access public */ - function factory($type, $name = '', $ident = '', $conf = array(), + function &factory($type, $name = '', $ident = '', $conf = array(), $maxLevel = PEAR_LOG_DEBUG) { $type = strtolower($type);