You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Mark Lepak <ml...@appliedtheory.com> on 2001/09/07 15:24:51 UTC

Looking for opinions...

I am working on a project that requires logging for two purposes:
1.  logging system level errors, warnings, etc.. (WARN, ERROR, DEBUG)
2.  logging application specific events.  (User X did this)

Will the best approach be to use WARN, DEBUG, ERROR for the system level 
events and use INFO for the application specific event, or is there a 
way to use the packaged Category class for system level events and use a 
new subclass of Category to handle application specific events.  

Any input would be helpful.

Mark Lepak


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Re: Looking for opinions...

Posted by Paul Glezen <pg...@atdial.net>.
Mark Lepak wrote:
> 
> I am working on a project that requires logging for two purposes:
> 1.  logging system level errors, warnings, etc.. (WARN, ERROR, DEBUG)
> 2.  logging application specific events.  (User X did this)
> 
> Will the best approach be to use WARN, DEBUG, ERROR for the system level
> events and use INFO for the application specific event, or is there a
> way to use the packaged Category class for system level events and use a
> new subclass of Category to handle application specific events.
> 
Your #1 above seems like event logging while #2 seems like tracing, or
perhaps auditing.  I would recommend using two distinct categories. It
would give you the freedom of the entire Priority spectrum for each
case.  I think you will find that you need it.

- Paul

-- 
Beware of bugs in the above code.  I have
only proved it correct, not tried it.
-Don Knuth

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


RE: Looking for opinions...

Posted by Alain RAVET <ar...@cirb.irisnet.be>.
Mark,

-----Message d'origine-----
De : Mark Lepak [mailto:mlepak@appliedtheory.com]
>> I am working on a project that requires logging for two purposes:
>> 1.  logging system level errors, warnings, etc.. (WARN, ERROR, DEBUG)
>> 2.  logging application specific events.  (User X did this)

Another point to consider : users can modify the log4j configuration file, if you don't take care.
This can have an impact if you use (*2) to track actions that have to be recorded for billing.

One solution : put the file in a jar, but again, a smart user could modify it : unzip, edit, rezip

Alain Ravet
Brussels, Belgium

This mail has been checked by exiscan.
To be safe, please scan the mail attachements with your local virus scanner !

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


RE: Looking for opinions...

Posted by Ylan Segal <yl...@digiworks.tv>.
> I am working on a project that requires logging for two purposes:
> 1.  logging system level errors, warnings, etc.. (WARN, ERROR, DEBUG)
> 2.  logging application specific events.  (User X did this)
>
> Will the best approach be to use WARN, DEBUG, ERROR for the system level
> events and use INFO for the application specific event, or is there a
> way to use the packaged Category class for system level events and use a
> new subclass of Category to handle application specific events.
>
 I thinks the category approach would be the best one. You can have:
System.some.category -- >for all system stuff and
Activities.some.categories --> for user activities and such.

The priorities you can still use, since both System stuff and user
activities can be looged with different levels.

Hope it helps,

Ylan.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org