log: add link to llog
Add helper function that can be used as llog backend. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
parent
a8f034fcbe
commit
35bea2847b
11
src/log.c
11
src/log.c
@ -495,6 +495,17 @@ void log_format(const char *file,
|
||||
errno = saved_errno;
|
||||
}
|
||||
|
||||
void log_llog(const char *file,
|
||||
int line,
|
||||
const char *func,
|
||||
const char *subs,
|
||||
unsigned int sev,
|
||||
const char *format,
|
||||
va_list args)
|
||||
{
|
||||
log_submit(file, line, func, NULL, subs, sev, format, args);
|
||||
}
|
||||
|
||||
void log_print_init(const char *appname)
|
||||
{
|
||||
if (!appname)
|
||||
|
12
src/log.h
12
src/log.h
@ -156,6 +156,10 @@ void log_clean_filter();
|
||||
* log_format:
|
||||
* Same as log_submit but first converts the arguments into a va_list object.
|
||||
*
|
||||
* log_llog:
|
||||
* Same as log_submit but used as connection to llog. It uses the default config
|
||||
* for every message.
|
||||
*
|
||||
* log_set_file(file):
|
||||
* This opens the file specified by \file and redirects all new messages to this
|
||||
* file. If \file is NULL, then the default is used which is stderr.
|
||||
@ -190,6 +194,14 @@ void log_format(const char *file,
|
||||
const char *format,
|
||||
...);
|
||||
|
||||
void log_llog(const char *file,
|
||||
int line,
|
||||
const char *func,
|
||||
const char *subs,
|
||||
unsigned int sev,
|
||||
const char *format,
|
||||
va_list args);
|
||||
|
||||
int log_set_file(const char *file);
|
||||
void log_print_init(const char *appname);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user