Re: [log4perl-devel] how to enable/disable appender in config file based on %ENV variable?

2011-09-20 Thread Kevin Goess
David, one way you can do this is by attaching a filter to your TraceApp appender, like this log4perl.filter.NotIfDevIP = sub { $ENV{REMOTE_ADDR} eq '192.168.0.34' ? 0 : 1 } log4perl.appender.TraceApp.Filter = NotIfDevIP See 'perldoc Log::Log4perl::Filter' On Mon, Sep 19, 2011 at 9:39 PM

[log4perl-devel] warning on uninitialized value when logging undef

2010-11-23 Thread Kevin Goess
This is kind of annoying thing that I noticed recently, if you do $logger->info($msg) and $msg is undefined then you get a warning: perl -W -Ilib -e 'use Log::Log4perl qw(:easy); Log::Log4perl->easy_init($INFO); INFO(undef)' Use of uninitialized value in join or string at lib/Log/Log4perl/Appe

Re: [log4perl-devel] Why is Log::Log4perl opening unreferenced log files and can I stop it

2010-07-07 Thread Kevin Goess
Martin, see 'perldoc Log4perl::Appender::File create_at_logtime The file appender typically creates its logfile in its constructor, i.e. at Log4perl "init()" time. This is desirable for most use cases, because it makes sure that file permission problems get detected right away, and not after day