File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Logging strategies in large applications Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Logging strategies in large applications" Watch "Logging strategies in large applications" New topic
Author

Logging strategies in large applications

Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3476

Hi.
I have a question about logging strategies used in applications like JBoss.
JBoss has a logging file called server.txt , all information go to this file.
Ofcourse, JBoss contains a huge number of classes, does JBoss create a single instance of logging object (singleton) and share this object with all classes ?
(I think synchronization statments are used here) ...
Please, correct me if I'm wrong.
Thanks.
Chris Johnston
Ranch Hand

Joined: Dec 13, 2004
Posts: 85
Check out the Log4j project as that is what JBoss uses for its logging. As far as I understand it, yes, JBoss creates a single instance of what is called the root logger from which all other loggers are created.

Log4j is more or less the defacto standard for logging in Java applications these days.

http://logging.apache.org/log4j/docs/


www.fuzzylizard.com
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

It would be good to look at Jakarta's commons logging stuff. This is a layer which sits on top of log4j (or whatever) so you are not tied into one logging framework.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Logging strategies in large applications
 
Similar Threads
Multiple context logging JBoss-Tomcat
JBoss' embedded tomcat not Logging
Log4j Grouping application logs
New to log4j - need some advice
issue locating a jar file for for logging