Web Hosting

JSP Hosting

Servlet Hosting

JAVA Hosting

J2EE Hosting

JBOSS Hosting

Tomcat Hosting

SSL Certificates

Order Now


New to hosting?
Check out the step-by-step guides to help you get started.
Setting up your 1st website
Transferring your website

Domain Search: www.

SERVERS & NETWORK  |  SUPPORT  |  WHY OXXUS  |  TESTIMONIALS  |  ABOUT US  |  CONTACT |  ORDER NOW

  

 

Integrating the Jakarta-Log4J Project

 

 

The Jakarta-Log4J Project

 

The Jakarta-Log4j project (Log4J) is another open source project sponsored by the Apache Software Foundation. It was founded by Ceki Gulcu with the intention of providing application developers with a sophisticated—yet simple—logging mechanism that could be integrated into Java applications.

 

The Log4J project comprises three main components: Layouts, Appenders, and Categories.

 

We describe each of these components in the following sections. To follow the examples in this chapter, you need the latest archive of log4j, which can be found at http://jakarta.apache.org/log4j/.

Layouts

 

Layouts allow you to customize the output format of a Log4J message.

They must be assigned to Appenders, which are discussed in the following section.

 

The simplest of the Log4J Layouts is the SimpleLayout, which logs only the Priority and the message. To assign the SimpleLayout to an Appender, we could use something similar to the following code snippet: log4j.appender.console.layout=org.apache.log4j.SimpleLayout

 

This line assigns a SimpleLayout to a previously defined Appender named console.

 

We discuss the appropriate location of Layout assignments in a subsequent section on configurators.

 

Output using the SimpleLayout would look similar to the following: DEBUG - This is the log message! You can find further documentation on the other Layouts packaged with Log4J.

 

Part 1 - Part 2 - Part 3

 

(c) Copyright 2003 Oxxus Tomcat4 Hosting Services. All rights reserved



Order with confidence
100% Secure Ordering
Privacy Policy
Money back guarantee


...........................................

 

Tomcat server tutorials:

What is Tomcat Valve?

Tomcat security realms

Log4j project

How to install Apache & Tomcat server?

How to use tomcat manager?

Jakarta Tomcat server overview

Persistent sessions

Embeddng Tomcat services

Find more about tomcat architecture

How to install Tomcat on Windows & Linux

 

Copyright ® 2003-2007 Oxxus.Net * USA * UK * AUP * Best web hosting solutions from internets leading web hosting provider * Tutorials * Resources * Blog * FAQ