728x90 AdSpace

Sunday, 11 August 2013

Log4j - Introduction


In this tutorials we will see about Log4j, which is one most popular logging API.Log4j is Fast,Flexible,Reliable and easily configurable Logging framework which is open source API distributed under Apache Software License, written in Java

Log4j is easily configurable by external xml or property file and we can configure log4j in java class itself and log4j can produce log message in following formats.

1.File

2.HTML

3.Database

4.console

.we will see this in details in up coming chapters.

Components of Log4j

There three main components available in Log4j

1.Logger – used to capture logging information

2.appenders – use to publish logging message in different formats

3.layouts – use to format log message in different style

Features of Log4j

1. Thread safe.

2.Speed

3.support multiple output appenders

4.Set logging property at run tie using configuration file

5. Internationalization

6. its makes debugging easier.

7. Multiples levels of log

8.customizable log message formats

Log4j contains two types of objects.

1.Core Object – Mandatory objects

  • Logger Objects
  • Layout Objects
  • Appenders

2.Support Objects – Optional objects

  • Level Objects
  • Filter Objects
  • Log Manager
  • Object Renderer

Annamalai Thangaraj

Annamalai is working as Technical Lead in Leading Telecom company with 5+ years experience in Identity and Access Management , Telecom and Networks, BigData, Java, Spring, Struts, Hibernate, AngularJS, and Enterprise Web Application Development.

Website: Java Tutorials Corner

Shop and help us

Flipkart Offer Snapdeal offer Amazon.in offer Amazon.com offer
  • Blogger Comments
  • Facebook Comments
  • Disqus Comments

0 comments:

Post a Comment

Item Reviewed: Log4j - Introduction Rating: 5 Reviewed By: Annamalai Thangaraj