You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4php-dev@logging.apache.org by ih...@apache.org on 2011/06/05 12:19:56 UTC
svn commit: r1132366 - /logging/log4php/trunk/src/main/php/Logger.php
Author: ihabunek
Date: Sun Jun 5 10:19:56 2011
New Revision: 1132366
URL: http://svn.apache.org/viewvc?rev=1132366&view=rev
Log:
Removed LOG4PHP_DIR constant since it was only used once throughout the codebase. Replaced with dirname(__FILE__).
Modified:
logging/log4php/trunk/src/main/php/Logger.php
Modified: logging/log4php/trunk/src/main/php/Logger.php
URL: http://svn.apache.org/viewvc/logging/log4php/trunk/src/main/php/Logger.php?rev=1132366&r1=1132365&r2=1132366&view=diff
==============================================================================
--- logging/log4php/trunk/src/main/php/Logger.php (original)
+++ logging/log4php/trunk/src/main/php/Logger.php Sun Jun 5 10:19:56 2011
@@ -18,16 +18,6 @@
* @package log4php
*/
-/**
- * LOG4PHP_DIR points to the log4php root directory.
- *
- * If not defined it will be set automatically when the first package classfile
- * is included
- *
- * @var string
- */
-if (!defined('LOG4PHP_DIR')) define('LOG4PHP_DIR', dirname(__FILE__));
-
if (function_exists('__autoload')) {
trigger_error("log4php: It looks like your code is using an __autoload() function. log4php uses spl_autoload_register() which will bypass your __autoload() function and may break autoloading.", E_USER_WARNING);
}
@@ -133,7 +123,7 @@ class Logger {
*/
public static function autoload($className) {
if(isset(self::$_classes[$className])) {
- include LOG4PHP_DIR.self::$_classes[$className];
+ include dirname(__FILE__) . self::$_classes[$className];
}
}