proxygen
proxygen/folly/folly/logging/docs/LogLevels.md
Go to the documentation of this file.
1 # Log Levels
2 
3 The available log levels are defined in `logging/LogLevel.h`
4 
5 ### `FATAL`
6 
7 A message logged with the `FATAL` log level will abort your program. `FATAL`
8 log messages cannot be disabled. If you have no log handlers configured when a
9 `FATAL` message is logged it will be printed to stderr, to ensure that your
10 program does not abort silently.
11 
12 ### `DFATAL`
13 
14 The `DFATAL` log level is similar to `FATAL`, but only aborts your program in
15 debug builds (if the `NDEBUG` preprocessor macro was not defined at build
16 time).
17 
18 ### `CRITICAL`
19 
20 `CRITICAL` is intended for important error messages. It falls in between `ERR`
21 and `FATAL`.
22 
23 ### `ERR`
24 
25 `ERR` is intended for error messages. This category is named `ERR` rather than
26 `ERROR` due to the fact that common Windows header files `#define ERROR` as a
27 preprocessor macro.
28 
29 ### `WARN`, aka `WARNING`
30 
31 `WARN` is intended for warning messages. `WARNING` is accepted as an alternate
32 name for `WARN`.
33 
34 ### `INFO`
35 
36 `INFO` is intended for informational messages.
37 
38 ### `DBG0` through `DBG9`
39 
40 There are 10 numbered debug message categories, `DBG0`, `DBG1`, `DBG2`, ...,
41 `DBG9`.
42 
43 Note that `DBG0` is a more important log level than `DBG9`. The number next to
44 the debug level can be thought of as its verbosity: the higher the debug level
45 the more verbose it is. Setting a log category's level to `DBG5` will enable
46 log messages with levels `DBG0` through `DBG5` (as well as higher levels such
47 as `INFO` and above), while messages at level `DBG6` through `DBG9` will be
48 disabled.
49 
50 ### `DEBUG`
51 
52 The `DEBUG` category falls below `DBG9`.
53 
54 Setting a log category's level to `DEBUG` will automatically enable all
55 numbered `DBG` levels.