|
SphinxBase
5prealpha
|
Somewhat antiquated logging and error interface. More...
#include <stdio.h>#include <stdlib.h>#include <stdarg.h>#include <string.h>#include <errno.h>#include "sphinxbase/err.h"#include "sphinxbase/prim_type.h"#include "sphinxbase/filename.h"#include "sphinxbase/ckd_alloc.h"Go to the source code of this file.
Functions | |
| void | err_msg (err_lvl_t lvl, const char *path, long ln, const char *fmt,...) |
| void | err_msg_system (err_lvl_t lvl, const char *path, long ln, const char *fmt,...) |
| void | err_logfp_cb (void *user_data, err_lvl_t lvl, const char *fmt,...) |
| int | err_set_logfile (const char *path) |
| Append all log messages to a given file. More... | |
| void | err_set_logfp (FILE *stream) |
| Direct all logging to a given filehandle if default logfp callback is set. More... | |
| FILE * | err_get_logfp (void) |
| Get the current logging filehandle. More... | |
| int | err_set_debug_level (int level) |
| Set debugging verbosity level. More... | |
| int | err_get_debug_level (void) |
| Get debugging verbosity level. More... | |
| void | err_set_callback (err_cb_f cb, void *user_data) |
| Sets function to output error messages. More... | |
Somewhat antiquated logging and error interface.
Definition in file err.c.
| int err_get_debug_level | ( | void | ) |
| FILE* err_get_logfp | ( | void | ) |
Get the current logging filehandle.
Definition at line 268 of file err.c.
Referenced by cmd_ln_parse_r(), and err_set_logfile().
| void err_set_callback | ( | err_cb_f | callback, |
| void * | user_data | ||
| ) |
| int err_set_debug_level | ( | int | level | ) |
| int err_set_logfile | ( | const char * | path | ) |
Append all log messages to a given file.
Previous logging filehandle is closed (unless it was stdout or stderr).
| file | File path to send log messages to |
Definition at line 241 of file err.c.
References err_get_logfp(), and err_set_logfp().
| void err_set_logfp | ( | FILE * | stream | ) |
Direct all logging to a given filehandle if default logfp callback is set.
| logfp | Filehandle to send log messages to, or NULL to disable logging. |
Definition at line 255 of file err.c.
Referenced by err_set_logfile().