On Thu, Dec 29, 2011 at 2:15 AM, Manasi Sahasrabudhe <sma...@gmail.com> wrote: > Is there a way to reset/flush logger?
This should be done when you call logger->shutdown() at the end of your testscript, depending on the Appender you have chosen. > When I run unit test cases from my logger I can see that logging output is > appended to the previous testcase? > any idea why? Sounds scary, no idea at the moment what might happen in your setup. Have you called shutdown after your testcases are run? Another option might be call to logger->resetConfiguration The log4php testcases do test logging (of course) maybe you find something interesting there. http://svn.apache.org/viewvc/logging/log4php/trunk/src/test/php/ Cheers Christian > > > On Wed, Dec 14, 2011 at 11:14 PM, Ivan Habunek <ivan.habu...@gmail.com> > wrote: >> >> Hi Manasi, >> >> On 15 December 2011 00:23, Manasi Sahasrabudhe <sma...@gmail.com> wrote: >> > I recently upgraded from 2.0 to 2.1 version of log4php. >> >> Well, 2.2. will be out before new year. :-) >> >> > I have a log4php.ini like this, >> > log4php.rootLogger=WARN, appender1, appender2, <myappender> >> >> Why do you have myappender surrounded with brackets (<>)? >> >> > <snip> >> > And I still see that ALL events are being logged and filter does not >> > work. >> > >> > Any thoughts/comments/suggestions? >> >> You are adding a filter which accepts messages with a certain string. >> This filter will remain neutral for messages which do not contain this >> string (it will not block them). If you want to block them you have to >> chain another filter (probably LoggerFilterDenyAll). Then >> LoggerFilterStringMatch will accept any messages containing the >> specified string and those which do not will be handed to the next >> filter which will deny them. >> >> I'm not sure why you're mentioning regex here since the string match >> filter does not do regex... >> >> Regards, >> Ivan > > -- http://www.grobmeier.de https://www.timeandbill.de