CAPS Universe documentation
1.0.4
All you need to know to be successful
|
Base API used all over the CAPS universe. More...
Enumerations | |
enum | caps_verbosity { LIBCAPS_PANIC = 1 , LIBCAPS_ERROR , LIBCAPS_WARN , LIBCAPS_INFO , LIBCAPS_LOUD , LIBCAPS_NOISY , LIBCAPS_DEBUG } |
Define the noise level of messages. All messages above a current noise level will be discarded. More... | |
Functions | |
void | caps_libbase_init (void) |
void | caps_verbosity_level_set (enum caps_verbosity level, bool overwrite) |
void | caps_message_stream_set (FILE *stream) |
void | caps_message_print (enum caps_verbosity level, const char *scope, const char *fn, int ln, const char *format,...) 6) |
enum caps_verbosity |
Enumerator | |
---|---|
LIBCAPS_PANIC | Really bad news, corresponds to caps_print_panic() |
LIBCAPS_ERROR | Any kind of error, corresponds to caps_print_error() |
LIBCAPS_WARN | Any kind of warnings, corresponds to caps_print_warn() |
LIBCAPS_INFO | Any kind of information, corresponds to caps_print_info() |
LIBCAPS_LOUD | Any kind of traceability, corresponds to caps_print_loud() |
LIBCAPS_NOISY | More traceability, corresponds to caps_print_noisy() |
LIBCAPS_DEBUG | Debugging information, only with configure's '–enable-debug', corresponds to caps_print_debug() |
void caps_libbase_init | ( | void | ) |
Initialize the library prior use
void caps_verbosity_level_set | ( | enum caps_verbosity | level, |
bool | overwrite | ||
) |
Define the verbosity level of messages the CAPS libraries should emit
[in] | level | Up to this verbosity level the libraries will emit messages |
[in] | overwrite | true to set the level value, false to restrict to higher level |
Messages with a higher level
will be dropped (refer caps_message_print() for details).
overwrite
is false, a new verbosity level is set only if the currently active level is 'lower'. E.g. if the current active level is LIBCAPS_WARN and you call level
with LIBCAPS_INFO it will be set. But if you call with level
LIBCAPS_ERROR instead, it won't be set.void caps_message_stream_set | ( | FILE * | stream | ) |
Setup the stream the CAPS universe should emit messages to (via caps_message_print)
[in] | stream | The stream to use for future messages (can be NULL) |
Until called with a different stream, the CAPS universe uses 'stderr' as the default
void caps_message_print | ( | enum caps_verbosity | level, |
const char * | scope, | ||
const char * | fn, | ||
int | ln, | ||
const char * | format, | ||
... | |||
) |
Print function used in the whole CAPS universe to emit messages
[in] | level | Verbosity level of this message |
[in] | scope | The message's scope, like it's package name |
[in] | fn | Name of the function, this output is from |
[in] | ln | Line number this call is from |
[in] | format | The format string. Refer the printf() manual for further details |