Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: [log4perl] log level vs. threadsby chrestomanci (Priest) |
on Aug 31, 2011 at 10:40 UTC ( [id://923395]=note: print w/replies, xml ) | Need Help?? |
Different threads will have separate private copies of the Log::Log4perldata structures, so any changes you make in one thread will not affect another. I can think of three solutions to your problem.
Of the three options, I think the third is probably the most reliable and safest in the long term. I would also ask why you are changing the log level at runtime? If it is as a response to an exceptional situation, then it would probably be better to log at a higher level to begin with, and adjust the retention of those detailed log files in response to a problem. Also it is worth noting that you can have different log4perl configurations for different classes within you perl program, so that would be another way of having more detailed logging for an area that deserves more logging.
In Section
Seekers of Perl Wisdom
|
|