Class 'Logger' not found in LoggerRoot.php when using require_once

1.1k Views Asked by At

I am using log4php here, and keeping get error when using require_once:

$path = dirname(__FILE__) . '/../log4php';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);
require_once 'Logger.php';

PHP Fatal error:  Class 'Logger' not found in /home/user/project/log4php/LoggerRoot.php on line 37.

Already tried to add the log4php folder to the include_path, and using the full path of log4php, but no luck. Actually, I use eclipse, and in eclipse, I can Ctrl+click to Logger class, which means the path should have no problem.

Any idea?

Thanks very much~


Solution: Still have no idea about the error I had, but it seems because I used the old pure log4php lib from this link . After changing to use the new lib of 2.3.0, then the problem solved.

0

There are 0 best solutions below