FIX: NOBUG_LOG env parsing error
[nobug.git] / doc / logging.txt
blob2f23f789bc7be3785697d3bb071b43fa3d9c6fe8
1 HEAD- Logging Concepts; loggingconcepts; destinations for logging output
3 Nearly all NoBug Macros emit some xref:logformat[log message]. NoBug gives
4 the user fine grained control over these log messages to display only
5 interesting information without loosing details.
7 Log messages can be routed to various destinations.  The following destintaions
8 are available:
10   *RINGBUFFER*::
11         The underlying storage backend. Messages are appended to the
12         end of the buffer, overwriting older messages at the front of
13         the buffer. NoBug comes with a highly efficient ringbuffer
14         implementation. This ringbuffer is temporary by default but
15         can be made persistent on disk which can be inspected with the
16         'nobug_rbdump' tool.
18   *CONSOLE*::
19         This is either just stderr, or, if running under a supported
20         debugger, the debuggers facilities to print messages will be used.
22   *FILE*::
23         The user can open files for log messages.
25   *SYSLOG*::
26         Messages are sent to the standard system logging daemon.
28   *APPLICATION*::
29         There are hooks which allow the programmer to catch logmessages and
30         display them in an application which are defined by the application.
32 Each log message has a priority describing its severity in the same way as
33 syslog messages do.
35 All non-fatal messages are associated with a programmer defined flag
36 describing the source of the message (subsystem, module, ...). This is
37 referred to as 'channels' in other logging systems. xref:logflags[Flags] make
38 it possible to configure logging in much detail at runtime.
40 Putting this all together: A user can define which source/flag will be logged at
41 what priority level and to which destination. To make this all easier, NoBug
42 tries to provide reasonable defaults.