Appender:
Appender Object is responsible for storing(printing) the logging messages to a different destinations.
Ex:- Files, console and database.
If you are willing to add Appender object inside your program then you can use following method.
public void addAppender(Appender appender);

The addAppender(Appender appender) method adds an Appender to the Logger object. It is possible to add many Appender objects to a logger in a comma-seperated list, each printing logging information to seperate destinations.
         Logger classes generates some statements under different levels right, this Appender takes these log statements and stores in some files or database.
         Appender is an interface. It is implemented by some predefined classes.

We have so many Appender interface classes are..
         FileAppender                   (writing into a file )
         ConsoleAppender          (Writing into console )
      JDBCAppender                (For Databases )
         JMSAppender
         RollingFileAppender
         SocketAppender

0 comments:

Post a Comment