correct macro parameter parentizing
[nobug.git] / doc / logconfiguration.txt
blobfcdbfe2a3d5923af71e9a43a6377653282968b67
1 HEAD~ Configuration; logconfig;
3 .Log Levels
5 Each log macro has an explicit or implicit log-level which
6 correspondends to syslog levels. Logging is only emitted when the
7 message is more severe or the same as a defined limit.
9 [[logdefaults]]
10 .Default levels for logging
11 [grid="all"]
12 `````~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13              , ALPHA, BETA   , RELEASE,
14 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 *ringbuffer* , TRACE, INFO   , NOTICE , ringbuffer must always be most verbose
16 *console*    , INFO , NOTICE , -1     , no log to console in release
17 *file*       , TRACE, NOTICE , WARNING,
18 *syslog*     , -1   , NOTICE , WARNING, no syslog for test runs
19 *application*, INFO , WARNING, ERROR  ,
20 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22 Depending on the build level, there is a default logging target and a default
23 limit which is selected when the user doesn't specify one.
25 The following default limits are available:
27   * In *ALPHA* builds, `NOBUG_LOG_LIMIT_ALPHA` is used which defaults to `LOG_INFO`
28   * In *BETA* builds, `NOBUG_LOG_LIMIT_BETA` is used and defaults to `LOG_WARNING`
29   * In *RELEASE* builds, `NOBUG_LOG_LIMIT_RELEASE` is used and defaults to `LOG_CRIT`
31 The default targets are:
33   * In *ALPHA* builds, `NOBUG_LOG_TARGET_ALPHA` is used which defaults to
34     `NOBUG_TARGET_CONSOLE`
35   * In *BETA* builds, `NOBUG_LOG_TARGET_BETA` is used and defaults to
36     `NOBUG_TARGET_FILE`
37   * In *RELEASE* builds, `NOBUG_LOG_TARGET_RELEASE` is used and defaults to
38     `NOBUG_TARGET_SYSLOG`
41 You can override all these values with your own values. As an alternative,
42 `NOBUG_LOG_LIMIT` and `NOBUG_LOG_TARGET` can be defined before
43 including "nobug.h" to override all defaults.