From: Mike S. <m...@pe...> - 2010-08-25 08:15:15
|
On Mon, 16 Aug 2010, fou...@bi... wrote: > we start logging prior to the temporary appender creation. So if we > set create_at_logtime and put all the temp app config in the main log > config, l4p tries to create the temp logfile before the creation of > the temp dir meant to contain the temp logfile... Somehow the use of a configuration file seems to defy the purpose of this particular use case. The configuration is usually read at start-up and determines the program's logging behavior. What you could do to point Log4perl at a tempfile created sometime at runtime, is obtain a reference to the file appender the configuration uses (or add another file appender via perl code) and use the file appender's file_switch( $newfile ) mode to point it to a newly created file. This might surprise your users, though, so be warned. -- Mike Mike Schilli m...@pe... |