|
From: Kevin G. <ke...@go...> - 2004-05-30 06:25:31
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Mike Schilli wrote:
| Kevin Goess wrote on 5/27/2004, 4:40 PM:
| > I was surprised to find out that this does not work:
| > whoranit = sub { $ENV{USERNAME} || $ENV{USER} }
| > log4perl.appender.x.ConversionPattern = %d ${whoranit} %m%n
|
| Another option to accomplish this would be using a cspec or a MDC setting.
Yeah, that's what I finally figured out. So %W and ${whoranit} end up
being the same thing inside a ConversionPattern.
| What do you think the chance of breaking current configs is? It's
| probably fairly low -- can you think of an example?
It makes me a little nervous doing our variable substitution on Perl
code when our variable markers look an awful lot like Perl's.
name=mywackylogger
...
log4perl.appender.x.emailaddr = \
sub { $name = $ENV{USER}; "${name}@initech.com" }
With my proposed changes, the emails would go to
"myw...@in..." instead of our developer.
Do you know how far log4j goes with the variable substitution stuff?
- --
Happy Trails. . .
Kevin M. Goess
(and Anne and Frank)
904 Carmel Ave.
Albany, CA 94706
(510)525-5217
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: Using GnuPG with Netscape - http://enigmail.mozdev.org
iD8DBQFAuX0S4g4/Tl71vUkRAuxHAJ9RkevEAdTW6UCMPWAwjlRciLLlLQCfTXZs
xgOchJmbn5CUn3v4Ol08Myw=
=BY0C
-----END PGP SIGNATURE-----
|