Log4j Arch contains mainly the following Objects
This Object is responsible to get logging messages from Java applications.
The main intention of Appender object is to get logging messages from Logger object and publishing that logging messages to the preferred destinations. Each and Every Appender Object must have at least one Destination object in order to send logging messages.
ConsoleAppender is able to store logging messages on Console.
The main intention of Layout object is to format logging messages in different styles. Layout Object is used by Appender object just before publishing Logging Messages.
The main intention of Level object is to define granularity and priority of any Logging information. Each and every Logging information must be with a particular Logging Level. Log4j API has provided the following Levels to the Logging messages.
Log4j is giving priorities for the logging messages in the following order.
ALL >TRACE > DEBUGG > INFO > WARN > ERROR > FATAL>OFF
LogManager is the central component , it able to manage Log4j framework, it will read all the initial configuration details from the configuration file and stored the Logger objects in namespace hierarchy with a particular reference name for future reference.
If our application access any Logger object on the basis of the reference name then LogManager will return the existed Logger object otherwise it will create new Logger object and return to the application.
The main intention of Filter object is used to analyze logging information and takes the decision whether the messages must be logged or not. An Appender object may have no of Filter objects, they must approve our logging message before publishing logging messages in destination.
This Object will be used by Layout object in order to get string representation of the several objects which are passed through Log4j framework