add a table for supported platforms to the manual
[nobug.git] / doc / logconfiguration.txt
blob0a90657edf456fcced216bd5e4e3cefe4a11dfc5
1 HEAD~ Configuration; logconfig;
3 .Log Levels
5 Each Log macro has a explicit or implicit Log-Level which
6 correspondends to syslog levels. Logging is only emitted when the
7 messages is more severe or same than a defined limit.
9 [[logdefaults]]
10 .Defaults 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 choosen when the user doesn't specify one.
25 The default limits are:
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`
40 You can override all of those values with your own preference. Alternatively
41 `NOBUG_LOG_LIMIT` and `NOBUG_LOG_TARGET` can be defined before
42 including "nobug.h" to override all defaults.