LogBox
The logBox structure is based on the LogBox declaration DSL, see the LogBox Documentation for much more information.
1
//LogBox DSL
2
logBox = {
3
// The configuration file without fileextension to use for operation, instead of using this structure
4
configFile = "config/LogBox",
5
// Appenders
6
appenders = {
7
appenderName = {
8
class="class.to.appender",
9
layout="class.to.layout",
10
levelMin=0,
11
levelMax=4,
12
properties={
13
name = value,
14
prop2 = value 2
15
}
16
},
17
// Root Logger
18
root = {levelMin="FATAL", levelMax="DEBUG", appenders="*"},
19
// Granualr Categories
20
categories = {
21
"coldbox.system" = { levelMin="FATAL", levelMax="INFO", appenders="*"},
22
"model.security" = { levelMax="DEBUG", appenders="console"}
23
}
24
// Implicit categories
25
debug = ["coldbox.system.interceptors"],
26
info = ["model.class", "model2.class2"],
27
warn = ["model.class", "model2.class2"],
28
error = ["model.class", "model2.class2"],
29
fatal = ["model.class", "model2.class2"],
30
off = ["model.class", "model2.class2"]
31
};
Copied!
Info : If you do not define a logBox DSL structure, the framework will look for the default configuration file config/LogBox.cfc. If it does not find it, then it will use the framework's default logging settings.
ConfigFile
You can use a configuration CFC instead of inline configuration by using this setting. The default value is config/LogBox.cfc, so by convention you can just use that location. If no values are defined or no config file exists, the default configuration file is coldbox/system/web/config/LogBox.cfc.
Last modified 2yr ago
Copy link
Edit on GitHub