libosmocore 0.9.6-23.20170220git32ee5af8.fc42
Osmocom core library
|
structure representing a logging target More...
#include <logging.h>
Data Fields | ||
struct llist_head | entry | |
linked list | ||
int | filter_map | |
Internal data for filtering. | ||
void * | filter_data [LOG_MAX_FILTERS+1] | |
Internal data for filtering. | ||
struct log_category * | categories | |
logging categories | ||
uint8_t | loglevel | |
global log level | ||
unsigned int | use_color:1 | |
should color be used when printing log messages? | ||
unsigned int | print_timestamp:1 | |
should log messages be prefixed with a timestamp? | ||
unsigned int | print_filename:1 | |
should log messages be prefixed with a filename? | ||
unsigned int | print_category:1 | |
should log messages be prefixed with a category name? | ||
unsigned int | print_ext_timestamp:1 | |
should log messages be prefixed with an extended timestamp? | ||
enum log_target_type | type | |
the type of this log taget | ||
union { | ||
struct { | ||
FILE * out | ||
const char * fname | ||
} tgt_file | ||
struct { | ||
int priority | ||
int facility | ||
} tgt_syslog | ||
struct { | ||
void * vty | ||
} tgt_vty | ||
struct { | ||
void * rb | ||
} tgt_rb | ||
struct { | ||
struct gsmtap_inst * gsmtap_inst | ||
const char * ident | ||
const char * hostname | ||
} tgt_gsmtap | ||
}; | ||
void(* | output )(struct log_target *target, unsigned int level, const char *string) | |
call-back function to be called when the logging framework wants to log a fully formatted string | ||
void(* | raw_output )(struct log_target *target, int subsys, unsigned int level, const char *file, int line, int cont, const char *format, va_list ap) | |
alternative call-back function to which the logging framework passes the unfortmatted input arguments, i.e. bypassing the internal string formatter | ||
structure representing a logging target
void(* log_target::output) (struct log_target *target, unsigned int level, const char *string) |
call-back function to be called when the logging framework wants to log a fully formatted string
[in] | target | logging target |
[in] | level | log level of currnet message |
[in] | string | the string that is to be written to the log |
Referenced by log_target_create_file(), log_target_create_rb(), log_target_create_stderr(), log_target_create_syslog(), and log_target_destroy().
void(* log_target::raw_output) (struct log_target *target, int subsys, unsigned int level, const char *file, int line, int cont, const char *format, va_list ap) |
alternative call-back function to which the logging framework passes the unfortmatted input arguments, i.e. bypassing the internal string formatter
[in] | target | logging target |
[in] | subsys | logging sub-system |
[in] | level | logging level |
[in] | file | soure code file name |
[in] | line | source code file line number |
[in] | cont | continuation of previous statement? |
[in] | format | format string |
[in] | ap | vararg list of printf arguments |
Referenced by log_target_create_gsmtap(), and osmo_vlogp().