mirror of
https://passt.top/passt
synced 2025-06-09 09:05:35 +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
8
util.h
8
util.h
|
@ -8,6 +8,14 @@ void warn(const char *format, ...);
|
|||
void info(const char *format, ...);
|
||||
void debug(const char *format, ...);
|
||||
|
||||
extern int log_trace;
|
||||
void trace_init(int enable);
|
||||
#define trace(format, ...) \
|
||||
do { \
|
||||
if (log_trace) \
|
||||
debug(format, ##__VA_ARGS__); \
|
||||
} while (0)
|
||||
|
||||
#ifndef SECCOMP_RET_KILL_PROCESS
|
||||
#define SECCOMP_RET_KILL_PROCESS SECCOMP_RET_KILL
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue