[log4perl-devel] Introspecting the $logger object for log file path and name?

2012-12-27 Thread Hugh Esco
Using Log::Log4perl, I need to test for the existence of a log path and create it if necessary, I had hopes that this might give me what I was looking for: my $path = Log::Log4perl->appender_by_name( 'log4perl.appender.A1.filename'); But I am ge

Re: [log4perl-devel] Introspecting the $logger object for log file path and name?

2012-12-27 Thread Mike Schilli
On Thu, 27 Dec 2012, Hugh Esco wrote: > Using Log::Log4perl, I need to test for the existence of a log path and > create it if necessary, I had hopes that this might give me what I was > looking for: > > my $path = > Log::Log4perl->appender_by_name( > 'log

Re: [log4perl-devel] Introspecting the $logger object for log file path and name?

2012-12-27 Thread Hugh Esco
Thank you. I will take a closer look at this once I am home. I'm curious how the Log::Log4perl class knows what config file to read when I invoke the ->appender_by_name() method. Also, once I have an $appender object, will ->filename() provide only the filename, or also its path? I'm pretty

Re: [log4perl-devel] Introspecting the $logger object for log file path and name?

2012-12-27 Thread Mike Schilli
On Thu, 27 Dec 2012, Hugh Esco wrote: > I'm curious how the Log::Log4perl class knows what config file to read > when I invoke the ->appender_by_name() method. The appender_by_name method assumes L4p configuration has already happened. If you want to read from a config file, you need to call init