Subject: | Error using layout and ConverstionPattern |
I'm attempting to use a layout and converstion pattern but receiving an error: here's my conf file:
log4perl.logger = DEBUG, Logfile
log4perl.appender.Logfile = Log::Dispatch::FileRotate
log4perl.appender.Logfile.filename = SMARTS.log
log4perl.appender.Logfile.max = 7
log4perl.appender.Logfile.DatePattern = yyyy-MM-dd-HH
log4perl.appender.Logfile.TZ = CST
log4perl.appender.Logfile.layout = Log::Log4perl::Layout::PatternLayout
log4perl.appender.Logfile.layout.ConversionPattern = %d{ISO8601}> %m%n
Here's the perl code:
#!/usr/bin/perl
use DBI;
use Log::Log4perl;
Log::Log4perl::init('R:\My Documents\eclipse\SMARTS\smarts-perl-log-conf');
$logger = Log::Log4perl->get_logger('Logfile');
$logger->debug('this is a debug message');
Here's the error message:
Use of uninitialized value in pattern match (m//) at C:/Perl/site/lib/Log/Dispatch/FileRotate.pm line 44.