cleanup in nobug.h, remove some cruft
[nobug.git] / doc / logging.txt
blobac2b1b634637e5210bddf3d2da8fc0aafa6d54b0
1 Logging
2 -------
4 Nearly all NoBug Macros emit some log message. NoBug gives the user fine
5 grained control over these log messages to display only interesting information
6 without loosing details.
8 Log messages are routed to different destinations which are:
10   *RINGBUFFER*::
11         The underlying storage backend. Messages are appended to the end of the
12         buffer, overwriting older messages at the front of the buffer. NoBug
13         comes with a highly efficient ringbuffer implementation. This
14         ringbuffer is temporary by default but can be made persistent
15         on disk. NoBug comes with a 'nobug_rbdump' tool to get a log
16         out of such a ringbuffer.
18   *CONSOLE*::
19         This is either just stderr or if running under valgrind then valgrind
20         facilities to include messages into its log will be used.
22   *FILE*::
23         The user can open Files for log messages.
25   *SYSLOG*::
26         Messages are send to the standard system logging daemon.
28   *APPLICATION*::
29         There is a hook which allows the programmer to catch logmessages and
30         display them in a application defined way.
32 Each logmessage 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 describing
36 the source of the message (subsystem, module, ...).
38 Putting it all together: A user can define which source/flag shall be logged at
39 what priority level and to which destination. To make this all easier NoBug
40 tries to give reasonable defaults.