aboutgitcodebugslistschat
path: root/passt.c
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2022-03-15 00:59:09 +0100
committerStefano Brivio <sbrivio@redhat.com>2022-03-25 13:21:13 +0100
commitd2e40bb8d98763e33c3eeac4f5f1b7c53465009f (patch)
treef2eb7812c96b418bbfe93dfc238afd466b78a946 /passt.c
parent14c4c0253c51506caddb380c65fd56e0cf1060ab (diff)
downloadpasst-d2e40bb8d98763e33c3eeac4f5f1b7c53465009f.tar
passt-d2e40bb8d98763e33c3eeac4f5f1b7c53465009f.tar.gz
passt-d2e40bb8d98763e33c3eeac4f5f1b7c53465009f.tar.bz2
passt-d2e40bb8d98763e33c3eeac4f5f1b7c53465009f.tar.lz
passt-d2e40bb8d98763e33c3eeac4f5f1b7c53465009f.tar.xz
passt-d2e40bb8d98763e33c3eeac4f5f1b7c53465009f.tar.zst
passt-d2e40bb8d98763e33c3eeac4f5f1b7c53465009f.zip
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>
Diffstat (limited to 'passt.c')
-rw-r--r--passt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/passt.c b/passt.c
index 40d3e57..5cd8f3b 100644
--- a/passt.c
+++ b/passt.c
@@ -96,7 +96,7 @@ char *ip_proto_str[IPPROTO_SCTP + 1] = {
static void sock_handler(struct ctx *c, union epoll_ref ref, uint32_t events,
struct timespec *now)
{
- debug("%s: %s packet from socket %i (events: 0x%08x)",
+ trace("%s: %s packet from socket %i (events: 0x%08x)",
c->mode == MODE_PASST ? "passt" : "pasta",
IP_PROTO_STR(ref.r.proto), ref.r.s, events);
@@ -351,6 +351,7 @@ int main(int argc, char **argv)
__setlogmask(LOG_MASK(LOG_EMERG));
conf(&c, argc, argv);
+ trace_init(c.trace);
if (!c.debug && (c.stderr || isatty(fileno(stdout))))
__openlog(log_name, LOG_PERROR, LOG_DAEMON);