Tuesday 17 October 2017

Simple Loging example by using Log4j


Log4j is Apache project for logging in java application .Log4j is written in java .  Log4j Apache project founded by Ceki Gülcü .

 
Ceki Gülcü .Geneva Area, Switzerland
 
 
log4j is a reliable, fast and flexible logging framework .
 
Log4j  Architecture
 
Log4J is layered architecture each layered provide different object perform different task .
there are two type of object in Log4j Architecture.
 
Core Object :-      Core Objects are mandatory objects used for logging .
Support Object: - Support Object are optional object used by Core object to perform logging .
 
Core Object :-  
Core Object consist of following type of objects
Logger Object :- Logger object used to capturing logging information .
Layout Object : - Layout object allow the publish logging information in different style .
Appender Object :- Appender  object  is responsible publish logging information to various preferred destination  such as database, file ,network , console .
 
Support Object :-
Level Object :- Level object define priority of any logging  information  there are seven logging level in log4j API.
1. OFF
2.DEBUG
3. INFO
4 ERROR
5 WARN
6 FATAL
7 ALL
Filter Object : -   Filter object is used to analyze logging information and further decide whether logging information is printed
 
 
 
 

No comments:

Post a Comment