advertisement
Premier Club Log In/Registration
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   SKILLBUILDING  |   TIP BANK  |   SOURCEBANK  |   FORUMS  |   NEWSLETTERS
Browse DevX
Download the code for this article
Log4j vs. the Java 1.4 Innate Language Logging Facility
Performance Impact
Partners & Affiliates
advertisement
advertisement
advertisement
Average Rating: 5/5 | Rate this item | 4 users have rated this item.
 

Track Your Apps with the Open Source Logging Framework, Log4j

As many developers can attest, logging is one of the most accessible ways to monitor the health and performance of your Java applications. Find out how Log4j, a logging framework from Apache, can handle both simple and advanced (multi-app, multi-machine) logging scenarios.  


advertisement
hey say 'necessity is the mother of invention.' Being able to keep an eye on your application is a need from which emerged logging and tracing frameworks. Application developers needed a way to have their programs relay vital signs and other signs of life to them. Many developers tend to use log statements as a low-tech approach to debugging. Such an approach is often leveraged in production, when you might not have the luxury of using your IDE's debugger against your production code. Also, when things go wrong, you can trace the root of a problem using persisted logs.


Log4j is an open source logging API for Java, designed to be "reliable, fast, and extensible." To the avail of programmers wanting to adopt an easy logging facility, Apache Log4j fits the mold.

Some Log4j Terminology
In the Log4j world:

  • Loggers are the workhorses for logging messages.
  • Appenders are associated to loggers and determine where log messages are reported.
  • Layouts define what your log messages will look like.

What You Need
At the time of this article's writing, Log4j was in version 1.2.8. You can download the latest Log4j version from: http://logging.apache.org/log4j/docs/download.html.

  Next Page: Doing Some Logging


Page 1: IntroductionPage 4: Some Advanced Log4j Logging
Page 2: Doing Some LoggingPage 5: The JMSQueueAppender
Page 3: Only One LoggerPage 6: Roll Your Own Appenders
Please rate this item (5=best)
 1  2  3  4  5
advertisement
Advertising Info  |   Member Services  |   Permissions  |   Contact Us  |   Help  |   Feedback  |   Site Map  |   Network Map  |   About

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs