Configuring LogBox
LogBox comes pre-configured for operation with very basic logging. However, you can customize it to your fancy using different configuration strategies using the programmatic configuration object or the LogBox Config DSL.
When you are in a ColdBox application, you will have a logbox
structure in your ColdBox.cfc
already that you can use, or you can create a portable CFC as well and place it in config/LogBox.cfc
The cool thing about this LogBox DSL is that it is the same whether you are using LogBox in ColdBox applications or any other framework or non-framework ColdFusion application.
Configuration can be done in the following ways:
No configuration: Uses the default configuration shown below
Portable CFC: Creating a portable data CFC using the LogBox DSL in a
configure()
methodLogBoxConfig: Creating the
LogBoxConfig
object and interacting with its methods programmaticallyLogBox DSL Struct: Passing a struct literal into LogBox, using the LogBox DSL.
1. Default Configuration
This is the default configuration when LogBox is created with no config:
2. Portable CFC
You can create a CFC with a single configure
method with the LogBox configuration in a variable called logbox
using the LogBox DSL.
3. Programmatic LogBoxConfig
4. Struct Literal Config
Last updated