|
From: Robert J. <yad...@sn...> - 2006-09-28 13:20:06
|
At 10:20 PM 9/27/2006, you wrote:
>Take a look at Log::Log4perl::Appender::Buffer, it does something similar:
Thanks much!
I'm using the DBI appender, with the NoopLayout and the data in
param.1, so I had to use:
$self->{appender}->{'bind_value_layouts'}{'1'}{'time_function'};
But it works great :)
Another question, mostly just curiousity -- I used Data::Dumper to
look at the appender structure. How/where does the time_function get
defined as sub {"DUMMY"}? I don't see that anywhere in the Log4perl
code... Is it a perl internal thing?
Below is an excerpt from the dump for the DBI appender.
$VAR1 = bless( {
'bind_value_layouts' => {
'6' => bless( {
'stack' => [
[
'm',
undef
]
],
'printformat' => '%s',
'dontCollapseArrayRefs' => undef,
'format' => undef,
'info_needed' => {
'm' => 1
},
'time_function' => sub { "DUMMY" },
'CSPECS' => 'cCdFHIlLmMnpPrtTxX%',
'message_chompable' => 0
}, 'Log::Log4perl::Layout::PatternLayout' ),
--
Rob
|