|
From: Silkenbäumer, K. <si...@im...> - 2010-01-27 07:51:07
|
Hi,
I'm using Log4perl more and more extensively. It's great.
However, I'm missing some features - maybe they are implemented right
now and I don't see them.
I found out I can use CODE refs in my config file.
log4perl.appender.testnameAppender.filename=sub { return 'example.log' }
This function doesn't get any arguments right now (warn @_)
Would be great to access the name of the logger (and maybe appender) there.
I have many loggers and they all do the same except for logging in
different files. So I need a log4perl.logger.* line and for each 4 (or
more) log4perl.appender.* lines which are equal but differ only in their
.filename.
Next thing is: using filenames, either with Dispatch::File or all the
others has one fatal behaviour: If the directory does not exists, it
throws an error message and quits.
As some dirs maybe deleted by cronjobs, they should be created when a
logger needs it.
I could write my own Dispatch-Class, but since all File::* are derived
from Dispatch::File, it's not a good idea, I guess. Should be
implemented in Dispatch::File.
Regards
Karsten
|