Loggers, appenders, and layouts

There are some important components of logging which we use at the time of implementing the logging mechanism for applications. Each term has its individual importance in tracking the events of the application. Let's discuss each term individually to find out their usage:

  • Loggers: It can be defined as the logical name for the log file. This logical name is written in the application code. We can configure an independent logger for each application.
  • Appenders: The process of generating logs is handled by appenders. There are many types of appenders, such as FileAppender, ConsoleAppender, SocketAppender, and so on, which are available in log4j. The following are some examples of appenders for log4j:
    log4j.appender.CATALINA=org.apache.log4j.DailyRollingFileAppender ...

Get Apache Tomcat 7 Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.