mirror of
https://passt.top/passt
synced 2025-08-13 10:33:13 +02:00
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:
parent
14c4c0253c
commit
d2e40bb8d9
9 changed files with 55 additions and 4 deletions
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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue