|
From: Mike S. <msc...@ao...> - 2003-10-10 18:44:37
|
Alex Marandon wrote on 10/10/2003, 6:40 AM:
> At first, I would like to congratulate log4perl developpers for their
> great works. It's really usefull for me.
Thanks!
> I've seen that it's possible, using the perlish configuration style to
> define a layout and to assign it to multiple appenders. But I
> don't find how to do the same with the configuration files syntax.
Good question -- it has been brought up in the log4j community:
http://www.geocrawler.com/archives/3/8711/2001/3/0/5390252/
The suggested workaround is to use configuration file "basic
substitution" (variable substitution), which is currently not available
in Log4perl. But now that I see a need for it, I'll put it right on the
TODO-List :).
For now, a hack to get what you want is to read in the configuration
file into a Perl string, manipulate it (variable substitution etc.) and
then feed it to init( \$string ). Again, it's a hack.
--
-- Mike
Mike Schilli
m...@pe...
|