Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^5: log4perl help

by jcb (Parson)
on Mar 04, 2021 at 03:14 UTC ( [id://11129103]=note: print w/replies, xml ) Need Help??


in reply to Re^4: log4perl help
in thread log4perl help

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?

Replies are listed 'Best First'.
Re^6: log4perl help
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:

    Log::Log4perl->appender_by_name('FILE')->file_switch('test2.log');

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11129103]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-04-24 16:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found