|
From: Alex M. <ale...@cl...> - 2003-10-20 15:48:45
|
Hello,
I wonder if there is a way, using Log::Log4perl::Appender::DBI, to set a
value for a logger, which will be inserted at all subsequent log
statements.
Maybe an exemple will help me to be understandable :
################################################################################
my $logger = Log::Log4perl::get_logger();
my $customer = get_cust_id();
do_something_dangerous() || $logger->error("Big problem !", $customer);
# ...
do_something_uncredibly_dangerous() || $logger->error("Aaargh !", $customer);
################################################################################
As you can see, I pass the same value as a second argument to several
statements, breaking the rule of once-and-only-once.
I'm looking for a way to affect values onces to my $logger, and then
this values will be inserted in the database for each call to logging
statements.
Any idea ?
--
Alex Marandon
CLARISYS Informatique
http://clarisys.fr
|