Log4j « Development « Java Articles

Home
Java Articles
1.Build Deploy
2.Class
3.Core Library
4.Data Types
5.Database JDBC
6.Design
7.Development
8.File Input Output
9.Graphics Desktop
10.J2EE Enterprise
11.J2ME Wireless
12.JVM
13.Language
14.Library Product
15.Network
16.Security
17.SOA Web Services
18.Test
19.Web Development
20.XML
Java Articles » Development » Log4j 

1. Log4j delivers control over logging    javaworld.com

In conformance with that rule, in early 1996 the EU SEMPER (Secure Electronic Marketplace for Europe) project decided to write its own tracing API. After countless enhancements, several incarnations, and much work, that API has evolved into log4j, a popular logging package for Java. The package is distributed under the IBM Public License, certified by the open source initiative.

2. Write custom appenders for log4j    javaworld.com

This article will look at how to extend log4j by adding a new appender—the part of the system responsible for actually sending the log messages somewhere. The appender I discuss is a lightweight version of the socket-based appender that comes with log4j, but you can easily add your own appenders to put log messages into a database or LDAP (lightweight directory access protocol) directory, wrap them in proprietary protocols, route them to specific directories, and so forth.

3. Build Flexible Logs With log4j    onjava.com

log4j can be downloaded from the Apache Web site. The download is available in two formats, tar.gz and zip. Both downloads contain the source code for the log4j API, documentation, examples, and distributable log4j executables in the form of .jar files. Extract the files to a location of your choice. The source code is supplied, in case you want to do a build for yourself. The build can be done with the help of Ant and the build.xml files that are provided; you can customize the build script if required. The build will produce the log4j-1.2.4.jar file in the dist/lib directory if built using the dist target. Note that for the build to be successful, you will need to have the Java Management Extensions (JMX) API in your classpath, as well.

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.