Refactor logging core into multiple functions, support multi-line logging
[nobug.git] / doc / logging.txt
blob8df700e7ffdd6e004503e76efe29dc137cba99ec
1 HEAD- Logging;;
3 Nearly all NoBug Macros emit some log message. NoBug gives the user fine
4 grained control over these log messages to display only interesting information
5 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 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 this all together: A user can define which source/flag will be logged at
39 what priority level and to which destination. To make this all easier, NoBug
40 tries to provide reasonable defaults.