Log4j Internal Flow

Log4j Internal Flow
Screenshot from 2020 01 14 17 37 56
  • If we create Logger object in Java application then a request will be send to Log4j Software about to create Logger object.
  • Log4j Software will search for log4j.properties/log4j.xml file in class path, if it is existed then Log4j Software will load and parse log4j configuration file then Log4j software will create Logger object.
  • After creating Logger object, Log4j Software will return Logger object to Java Application.
  • If we access any logger method from Logger reference then Java application will send logging responsibility to Log4j software.
  • Log4j Software will activate Appender object in order to perform logging.
  • Appender will recognize all the filters which are associated then Appender will execute all the filters in sequence, where filters will filters the logging messages to persist or display.
  • Appender will activate Layout object , it will apply the layout styles on the logging messages.
  • After Styling Logging messages, Appender will activate Object Render to recognize the destination.
  • Sending Logging messages to the respective Destination.

Log4j Internal Flow
Scroll to top