9 before using any other NoBug feature. Probably in main or any other library
10 initialization routine. Calling `NOBUG_INIT` more than once is supported and each
11 subsequent call will be a no-op, thus initialization in main and in libraries
15 Since NoBug is intended to be available through the whole lifetime,
16 destroying it is not advised. Nevertheless there is a desstoy function
17 void nobug_destroy (void)
19 for shutting down NoBug, and free all resources associated with it.
20 This is mostly used in the NoBug testsuite itself to check for leaks
21 and it might be useful for other programs which employ some kind of
24 HEAD== Init logging Flags;;
26 If you want to use environment variable controlled debuging, then you have to
27 initialize each defined flag with
29 NOBUG_INIT_FLAG(flagname)
33 NOBUG_INIT_FLAG_LIMIT(flagname, default)
35 or one of the C++ compatibility macros.
37 This is documented later in the xref:logconfig[logging configuration] chapter.
41 In Multithreaded programs you should assign an identifier to each
42 thread. A thread identifier is a string which will be automatically
43 appended with an underscore and a incrementing integer. It is is created with:
45 NOBUG_THREAD_ID_SET(name)
47 Calling `NOBUG_THREAD_ID_SET("worker")` will yield in a thread
48 identifier 'worker_1' for example.
50 If you don't set an identifier, then NoBug will assign an automatic one.
51 This is further documented in the xref:multithreading[multi threading]
52 section of this manual.
57 -------------------------------------------------------
59 NOBUG_DEFINE_FLAG(example);
66 NOBUG_THREAD_ID_SET("main");
67 NOBUG_INIT_FLAG(example);
71 -------------------------------------------------------