Thank you for writing this guide.  I think it is a good start, and could be
expanded some.

> Separate files for different areas of interest

While the focus here appears to be on logging for the developer with the
intention of debugging or diagnosing problems, I think it is very important to
point out that logs can have other audiences.  As examples, an audit log might
be required for third-party reviews, a security log for evaluation of threats or
attacks by the security team, a database log for assisting with planning or
optimization by the DBAs, a network or connections log for management by the
network operations staff, etc.  Each audience will have their own needs related
to what should be logged.

> Programming with log4j
> Every class must contain this line...EVERY CLASS!

Actually, I doubt every class needs that line.  Having just turned on eclipse's
warning for unused local or private members, I went through and cleared out that
line from almost a hundred (generally very simple) classes where the logger was
never used.  Whether you use it depends really on what you want to log and why.

As for that, first it is best to mention what should NOT be logged:  Do NOT log
valuable information.

By valuable, I mean information that has value to the organization or the users,
as opposed to the developers.  For instance, in medical applications, you should
not log personal health information (PHI).  This is hopefully obvious, but I
would never want to see this in a log:
2004-09-28/18:37:35.138/PDT - Submitted POSITIVE result for HERPES test for
patient SMITH.

That could violate the HIPAA law, create a severe privacy breach if someone
unauthorized reviewed your log, and might include information that the developer
is not even legally permitted to see.

As another example, in a banking system, you should not log personal account
details, social security numbers, etc. to a file whose only purpose is for
debugging.  Thankfully, in most cases, the exact personal details are not
necessary for debugging an application.

> Configuration

I recommend giving an example of the XML format of the log4j configuration file
as well.

Thanks again.
Richard J. Barbalace


> -----Original Message-----
> From: Julius Davies [mailto:[EMAIL PROTECTED] 
> To: Log4J Users List
> Subject: log4j best practises
> 
> Here's a page of what I consider log4j best practises:
>
> http://juliusdavies.ca/logging.html
>
> Any comments are very welcome!

The information transmitted in this electronic communication is intended only
for the person or entity to whom it is addressed and may contain confidential
and/or privileged material. Any review, retransmission, dissemination or other
use of or taking of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited. If you received this
information in error, please contact the Compliance HelpLine at 800-856-1983 and
properly dispose of this information.




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to