logging-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: Logging best practices?
Date Tue, 07 Dec 2004 14:38:38 GMT

You're asking for best practices, right?

>This is fine and has been working for us. However, now we are moving
>managed regions, which equate to a test, qa and prod regions. The
>now becomes a question of managing the logging level depending on what
>region we are in.
>We do not have the ability to change the application property files
once it
>moves into Test and all files from Test get moved up to QA. All files
>QA eventually move up to Prod. So, as you can see, if we turn on
logging in
>Test, then that logging will be on in Prod, which we do not want.

This is far from a best practice.  It is expected that code and tests
remain the same across environments, but configuration is subject to

You could consider programmatic configuration that takes into account
the environment, but the best solution is to have a different log4j
configuration file for each environment to fit your needs for that
environment.  You can have your build script fill in relevant things
automatically by using Ant filter tokens, for example.

Yoav Shapira http://www.yoavshapira.com

This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.

View raw message