logging-log4php-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Hammers (JIRA)" <j...@apache.org>
Subject [jira] Created: (LOG4PHP-84) undefined method getLoggerRepository() in LoggerLoggingEvent
Date Sun, 13 Sep 2009 21:16:57 GMT
undefined method getLoggerRepository() in LoggerLoggingEvent
------------------------------------------------------------

                 Key: LOG4PHP-84
                 URL: https://issues.apache.org/jira/browse/LOG4PHP-84
             Project: Log4php
          Issue Type: Bug
          Components: Code
            Reporter: Christian Hammers


Hi

LoggerRepositories were recently removed, or? One occurence in LoggerLoggingEvent is still
left.

Fatal error: Call to undefined method LoggerRoot::getLoggerRepository() in /srv/home/james/workspace/log4php/src/main/php/LoggerLoggingEvent.php
on line 266

Call Stack:
    0.0007     123248   1. {main}() /srv/home/james/workspace/log4php/src/examples/php/renderer_default.php:0
    0.0217    1035952   2. Logger->debug() /srv/home/james/workspace/log4php/src/examples/php/renderer_default.php:38
    0.0217    1036280   3. Logger->logLevel() /srv/home/james/workspace/log4php/src/main/php/Logger.php:215
    0.0217    1036664   4. Logger->forcedLog() /srv/home/james/workspace/log4php/src/main/php/Logger.php:330
    0.0218    1039616   5. Logger->callAppenders() /srv/home/james/workspace/log4php/src/main/php/Logger.php:272
    0.0218    1040432   6. LoggerAppender->doAppend() /srv/home/james/workspace/log4php/src/main/php/Logger.php:409
    0.0218    1040688   7. LoggerAppenderEcho->append() /srv/home/james/workspace/log4php/src/main/php/LoggerAppender.php:134
    0.0218    1040816   8. LoggerLayoutSimple->format() /srv/home/james/workspace/log4php/src/main/php/appenders/LoggerAppenderEcho.php:77
    0.0219    1041136   9. LoggerLoggingEvent->getRenderedMessage() /srv/home/james/workspace/log4php/src/main/php/layouts/LoggerLayoutSimple.php:57


Reproducable with:

log4php.renderer.MyClass = MyClassRenderer
log4php.appender.default = LoggerAppenderEcho
log4php.appender.default.layout = LoggerLayoutSimple
log4php.rootLogger = DEBUG, default

and:

require_once dirname(__FILE__).'/../../main/php/Logger.php';
Logger::configure(dirname(__FILE__).'/../resources/renderer_default.properties');

class Person {
    public $firstName = 'John';
    public $lastName = 'Doe';
}

class MyClassRenderer implements LoggerRendererObject {
    public function render($o) {
        return $o->lastName.', '.$o->firstName;
    }
}

$person = new Person();

$logger = Logger::getRootLogger();
$logger->debug("Now comes the current person object:");
$logger->debug($person);


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message