How Does LogBox Work?
Last updated
Last updated
LogBox has five main components:
LogBox
The central library that stores your loggers, appenders, categories, and configuration
Logger
The class in charge of sending messages to the appropriate destinations according to the category it has been defined with.
Categories
Each Logger is created with a unique category that usually maps to the classpath of the CFC that uses the logger.
Appenders
Components that receive log events and send them for storage in their implementations: files, consoles, etc.
Layouts
The appenders will send the messages to their destinations using a specified format. This is called the layout of the message. LogBox comes with default layouts, but you can build your own.
These components work in unison to deliver messages' logging and tracing and control how they are logged. You will primarily interact with the Logger component as it will send your statements to the Appenders you have configured. Users can extend LogBox and build custom appenders and layouts.