more useful options | |
PerlMonks |
Log::Log4perl appender added at runtime doesn't receive messagesby mcso (Novice) |
on May 13, 2016 at 13:38 UTC ( [id://1162955]=perlquestion: print w/replies, xml ) | Need Help?? |
mcso has asked for the wisdom of the Perl Monks concerning the following question:
Hello monks!
I am playing around with Log::Log4perl for a project, and I need to add an appender at runtime, in addition to some default loaded from a configuration file. I can add an appender, and I can see that the appender is in the list, but it doesn't seem to get any of the messages. Example script:log4perl.conf Output:
I have played around with a wide variety of ways to add the appender and getting the string, but I can't figure this one out. To make it slightly more fun, unless the solution really requires it, I am stuck with version 1.41 of Log::Log4perl. Bonus question if there is a solution to the above: If I were to have multiple threads, and each of them should have their own string appender which would not pick up logging from the other threads, a suggestion to how I should do that?
Back to
Seekers of Perl Wisdom
|
|