No recent polls found
Welcome to the Monastery | |
PerlMonks |
in reply to Re^2: log4perl help
in thread log4perl help
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: log4perl help
by drohr (Acolyte) on Mar 03, 2021 at 16:23 UTC | |
I appreciate the help and I know about the documentation. I have been reading all that I can and trying to implement what is being discussed. Clearly, I am not understanding something and I would like some specific code direction. I took the advice and tried to use the init() method. Here is my attempt:
I can query and modify the appenders in the modify_logger() function (I can see the changes in my debugger), but the logging behavior does not change. How can I change the values AND the behavior? I have been banging my head against this problem and I could really use some specific help. Thank you | [reply] [d/l] |
by jcb (Parson) on Mar 04, 2021 at 03:14 UTC | |
While I am unfamiliar with Log4perl, I can guess that there is probably some action you must take to cause the output file to be reopened before a change to the output filename will be effective. Is there some kind of "rotate logs" operation in Log4perl? | [reply] |
by drohr (Acolyte) on Mar 04, 2021 at 18:57 UTC | |
After alot of searching, I found this: http://log4perl.sourceforge.net/releases/Log-Log4perl/docs/html/Log/Log4perl/Appender/File.html So, for the next person who runs into this issue. This is how you change the file in an appender at run time:
| [reply] [d/l] |