On Mon, 14 Sep 2009 08:55:14 +0100
Michael Erskine <michael.ersk...@ketech.com> wrote:
From: Jacob Kjome [mailto:h...@visi.com]
Subject: Re: Verifying initialization
have you tried using?.....
-Dlog4j.debug=true
I think what is being discussed here (correct me if I'm wrong) is the
_unattended_ programmatic verification of initialisation rather than a
one-time human-observed verification or additional verbosity (that nobody
will read anyway!). If the logging isn't working as expected then I usually
have one or more flags set that will indicate the problem in any dashboards,
GUIs, JConsoles, status reports, what-have-you. rather than find out after 30
days of uptime that there's no audit trail!
I understand what is desired. And it would certainly be possible to write
such a thing. However, I think it is overkill. Your config file is either
valid or not. If you run it once with -Dlog4j.debug=true and don't find any
issues, then, in my book, you are about 99% sure that everything is good to
go. And reloading the same unmodified configuration at a later date in a new
JVM should not change that fact. Again, it's either right or it's not. That
is unless Log4j was embedded with a super-secret randomizer just to mess with
your head? Thankfully, given the number of eyes on the codebase over the
years, I am fairly certain this is not the case.
So, no, there is nothing to validate runtime configuration. However, the
reason none exists is probably because it's not needed 99.999999999% of the
time and one-time human validation using -Dlog4j.debug=true is enough for most
people. If it worked once, it ought to work again.
Jake
Regards,
Michael Erskine.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org