In a message dated Mon, 30 Sep 2002 4:32:35 PM Eastern Standard Time, as...@vi... writes:
>I noticed the following disconnect between your
>O'Reillynet article and the actual code in Log4perl :
>If we had left out the mode =>
>"append" pair, then it would just overwrite the file
>each time at system startup.
Funny, we cheated on this a bit since 0.23. After I ran into the "if you don't say 'append' explicitely, your apps will clobber the log file every time" a couple of times and we saw that the Java file appender appends (sic!) by default, we taught Appender.pm to modify Log::Dispatch::File's default setting to "mode => 'append'" -- and lived happily ever after. Of course, the article was based on 0.22. If you need to overwrite, you can of course still do that by saying "mode => 'write'" explicitely.
>[ps] - please ignore the bit about calling ::Levels::to_priority(). It would be cool, but I also finally noticed :levels. Sorry about that.
Actually, I liked it and included it, more DWIM'ness is always a good idea.
--
-- Mike
############################
# Mike Schilli #
# log...@pe... #
# http://perlmeister.com #
# log4perl.sourceforge.net #
############################
|