Hello
How and when are the LoggerRenderer* classes supposed to be used?
There is not LayoutPattern %-tag for a dump of the object and it does
not seem to get called for normal logging messages.
The following still just prints "INFO - Hello World!".
bye,
-christian-
----------------------------------
log4php.renderer.Fruit3 = FruitRenderer3
log4php.appender.default = LoggerAppenderEcho
log4php.appender.default.layout = LoggerLayoutSimple
log4php.threshold = DEBUG
log4php.rootLogger = DEBUG, default
------------------------------
------------------------------------------------------
require_once dirname(__FILE__).'/../../main/php/Logger.php';
Logger::configure(dirname(__FILE__).'/../resources/renderer_default.properties');
class Fruit3 {
public $test1 = 'test1';
public $test2 = 'test2';
public $test3 = 'test3';
public function __construct() {
$logger = Logger::getLogger("Fruit3");
$logger->info("Hello World!");
}
}
class FruitRenderer3 implements LoggerRendererObject {
public function render($o) {
return 'Fruit is: '.$o->test1.','.$o->test2.','.$o->test3;
}
}
$fruit = new Fruit3();
--------------------------------------------------