scopecheck doced
[nobug.git] / doc / initialization.txt
blob1be3c04f835dfc41ce25d485f09a62c2a44355a4
1 Initialization
3 Global init
5 You have to call
7   * NOBUG_INIT
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
12 won't interfere.
14 Control Flags
16 If you want to use environment variable controlled debuging, then you have to
17 initialize each flag with
19   * NOBUG_INIT_FLAG(flagname)
23   * NOBUG_INIT_FLAG_LIMIT(flagname, default)
25 This is documented later in NoBug/Documentation/Macros/LoggingConfiguration.
27   * <!> These two macros call NOBUG_INIT for backward compatibility.
29 Threads
31 In Multithreaded programs you should assign an identifier to each thread after
32 it is created with
34   * NOBUG_THREAD_ID_SET(name)
36 If you don't call it, then NoBug will assign a automatic identifier. This is
37 documented in NoBug/Documentation/Macros/MultiThreading.