conf, util, tap: Implement --trace option for extra verbose logging
--debug can be a bit too noisy, especially as single packets or socket messages are logged: implement a new option, --trace, implying --debug, that enables all debug messages. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
6
util.c
6
util.c
@@ -45,6 +45,7 @@ static int log_sock = -1;
|
||||
static char log_ident[BUFSIZ];
|
||||
static int log_opt;
|
||||
static time_t log_debug_start;
|
||||
int log_trace;
|
||||
|
||||
#define logfn(name, level) \
|
||||
void name(const char *format, ...) { \
|
||||
@@ -77,6 +78,11 @@ logfn(warn, LOG_WARNING)
|
||||
logfn(info, LOG_INFO)
|
||||
logfn(debug, LOG_DEBUG)
|
||||
|
||||
void trace_init(int enable)
|
||||
{
|
||||
log_trace = enable;
|
||||
}
|
||||
|
||||
/**
|
||||
* __openlog() - Non-optional openlog() wrapper, to allow custom vsyslog()
|
||||
* @ident: openlog() identity (program name)
|
||||
|
Reference in New Issue
Block a user