well, it *should* take the calling object as argument, for example MyClass. But I am currently unsure if it is used or not or used correct. Did you check if this happens in the Renderer-classes? I guess I will have some time for log4php soon (thanks xmas too :-)) and can read some code. However, its definitley from old ages and we should discuss critical about it
Cheers Christian 2010/12/26 Ivan Habunek <[email protected]>: > All the Logger logging functions take two arguments (quoting phpdoc): > * @param mixed $message message > * @param mixed $caller caller object or caller string id > > Now, call me crazy, but I just don't understand what $caller is used for. > > First, it is propagated to forcedLog() method where it is ignored, unless it > is an Exception (Logger.php:285). If it is an Exception then it is > propagated into the LoggerLoggingEvent object (Logger.php:287) and ends up > in LoggerLoggingEvent->throwableInfo (LoggerLoggingEvent.php:153). From > there, I can't find it being accessed almost anywhere (only in one test: > LoggerLoggingEventTest.php:44). > > To me, this looks like something that was left over from some previous > functionality. Maybe you know something more? > > Since $caller appears in the most exposed methods in the whole project, I > think we should either rewrite the docs to reflect the actuall > functionality, or remove it from the methods if it has no use. > > Regards, > Ivan > > P.S. Finally a couple of days peace so I can put in a few hours on log4php. > Gotta love Christmas. :D > -- http://www.grobmeier.de
