H:/Class/11756/HLab/sphinxbase-0.4/src/libsphinxbase/util/err.c File Reference
Somewhat antiquated logging and error interface.
More...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include "err.h"
#include "config.h"
Functions |
FILE * | err_get_logfp (void) |
FILE * | err_set_logfp (FILE *newfp) |
int | err_set_logfile (char const *file) |
void | _E__pr_info_header_wofn (char const *msg) |
void | _E__pr_header (char const *f, long ln, char const *msg) |
void | _E__pr_info_header (char const *f, long ln, char const *msg) |
void | _E__pr_warn (char const *fmt,...) |
void | _E__pr_info (char const *fmt,...) |
void | _E__die_error (char const *fmt,...) |
void | _E__fatal_sys_error (char const *fmt,...) |
void | _E__sys_error (char const *fmt,...) |
void | _E__abort_error (char const *fmt,...) |
Variables |
FILE * | logfp = (FILE *)-1 |
Detailed Description
Somewhat antiquated logging and error interface.
Function Documentation
void _E__abort_error |
( |
char const * |
fmt, |
|
|
|
... | |
|
) |
| | |
void _E__die_error |
( |
char const * |
fmt, |
|
|
|
... | |
|
) |
| | |
void _E__fatal_sys_error |
( |
char const * |
fmt, |
|
|
|
... | |
|
) |
| | |
void _E__pr_header |
( |
char const * |
f, |
|
|
long |
ln, |
|
|
char const * |
msg | |
|
) |
| | |
void _E__pr_info |
( |
char const * |
fmt, |
|
|
|
... | |
|
) |
| | |
void _E__pr_info_header |
( |
char const * |
f, |
|
|
long |
ln, |
|
|
char const * |
msg | |
|
) |
| | |
void _E__pr_info_header_wofn |
( |
char const * |
msg |
) |
|
void _E__pr_warn |
( |
char const * |
fmt, |
|
|
|
... | |
|
) |
| | |
void _E__sys_error |
( |
char const * |
fmt, |
|
|
|
... | |
|
) |
| | |
FILE* err_get_logfp |
( |
void |
|
) |
|
Get the current logging filehandle.
- Returns:
- Current logging filehandle, NULL if disabled.
int err_set_logfile |
( |
char const * |
file |
) |
|
Append all log messages to a given file.
Previous logging filehandle is closed (unless it was stdout or stderr).
- Parameters:
-
| logfp | File to send log messages to, or NULL to disable logging. |
- Returns:
- 0 for success, <0 for failure (e.g. if file does not exist)
FILE* err_set_logfp |
( |
FILE * |
logfp |
) |
|
Direct all logging to a given filehandle.
- Parameters:
-
| logfp | Filehandle to send log messages to, or NULL to disable logging. |
- Returns:
- Previous logging filehandle, if any.
Variable Documentation