From: Kevin G. <cp...@go...> - 2006-03-07 16:51:22
|
> The standard Log::Log4perl::Appender::File appender in Log4perl opens > its files at init() because it's usually not a problem having a handful > of files open, even if they're not written to. Alternatively, it could > open the files at log() time, which would impose a small penalty on > the appenders with every log(). There's also the matter of reliability. It would be pretty annoying to have your program run for an hour, die of a fatal error, and then have the error message vanish into the ether because the program didn't have permissions to write to the log file. By opening the files at the beginning, log4perl ensures that it will actually be able to write to each file if it every needs to. -- Happy Trails . . . Kevin M. Goess |