3 NOBUG_DEFINE_FLAG (test
);
5 /* application level logging hook */
6 void callback (const struct nobug_flag
* flag
, int priority
, const char *log
, void* data
)
8 fprintf (stderr
, "callback %s %d %s %p\n", flag
->name
?flag
->name
:"", priority
, log
?log
:"NO LOG", data
);
16 NOBUG_INIT_FLAG (test
);
19 INFO (test
, "Logging enabled");
20 nobug_logging_callback
= callback
;
21 nobug_postlogging_callback
= callback
;
22 WARN (test
, "second log line");
23 nobug_callback_data
= (void*) 0x1234;
24 ERROR (test
, "third log line");
26 NOTICE (test
, "Multi\nline\nlogging");