tune has asked for the wisdom of the Perl Monks concerning the following question:
Then it should be something like this:my $logfile = "/tmp/sybase_wrapper_xlog_$callerfile"; Log::Log4perl::init(\ qq{ log4perl.logger.DBIx.Log4perl = DEBUG, A1 log4perl.appender.A1 = Log::Log4perl::Appender::File log4perl.appender.A1.filename = $logfile log4perl.appender.A1.mode = append log4perl.appender.A1.layout = Log::Log4perl::Layout::Pattern +Layout log4perl.appender.A1.layout.ConversionPattern=%d [%r] %P %C %p +> %H:%F{1}:%L %M - %m%n });
But it's not working. Nothing shows up in the logfile, only the messages generated by DBI. Perhaps I am missing something at the get_logger method, which I can't figure out, any suggestions? Thanks!my $log = Log::Log4perl->get_logger(); $log->debug("Debug message"); $log->info("Info message"); $log->error("1234 Error message");
--
tune
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBIx::Log4perl -- how to log my own errors
by mje (Curate) on Jan 04, 2011 at 17:38 UTC |