Re: Logging Strategy/best practice
- From: Raymond DeCampo <nospam@xxxxxxxxxxxx>
- Date: Thu, 28 Jul 2005 18:22:59 GMT
Lord0 wrote:
Hi there,
I am working on a startup J2EE project: JBoss, Spring, Hibernate etc. One of my responsibilities is to set up the "logging".
I have chosen to use log4j, or more precisely was nudged in that direction. I've used it before on smaller projects with no problems; basically a log4j.properties file defining various categories, appenders and layouts. This approach seems a bit shallow for a larger project i.e. 100s+ of classes - maybe I'm wrong.....
That depends on how your loggers are used.
Keep in mind that you can configure loggers at the "package" level. That is, you can set the logging for com.xyz.abc.def to INFO and that applies to all loggers of the form com.xyz.abc.def.*.
Questions:
1. Is log4j a suitable solution for this environment?
Of course.
2. Any URLs for logging best practices/patterns. Here I am thinking about something more involved than a "Log4j 101" article.
http://logging.apache.org
The founder of log4j has written a book that serves as a manual. You should be able to find it from the Apache site.
You may also want to join the log4j-users mailing list, also available from the Apache site.
3. Anything else I should consider?
Use the XML format for the properties file, not the .properties format.
Cheers for yer time
Lord0
HTH, Ray
-- XML is the programmer's duct tape. .
- Follow-Ups:
- Re: Logging Strategy/best practice
- From: Lord0
- Re: Logging Strategy/best practice
- References:
- Logging Strategy/best practice
- From: Lord0
- Logging Strategy/best practice
- Prev by Date: Re: XPath on DOMTree
- Next by Date: Re: Eclipse components
- Previous by thread: Re: Logging Strategy/best practice
- Next by thread: Re: Logging Strategy/best practice
- Index(es):
Relevant Pages
|