From ab81c355fa292b7d71253a4b8d3a3daf31a78ed1 Mon Sep 17 00:00:00 2001 From: Arturo Borrero Gonzalez Date: Fri, 28 Oct 2016 08:57:08 +0200 Subject: log: print messages to stdout/sderr if running in console mode If conntrackd is running in console mode (i.e. in foreground) then we can print the log messages to stdout/stderr. This eases the workflow for admins, since we condensate more info into the same terminal output. Example: % sudo conntrackd -C /etc/conntrackd.conf WARNING: XXXX is an invalid interface [Thu Oct 27 13:57:09 2016] (pid=7581) [notice] disabling internal cache [Thu Oct 27 13:57:09 2016] (pid=7581) [notice] disabling external cache [Thu Oct 27 13:57:09 2016] (pid=7581) [ERROR] can't open channel socket: No such device [Thu Oct 27 13:57:09 2016] (pid=7581) [ERROR] initialization failed ERROR: conntrackd cannot start, please check the logfile for more info Signed-off-by: Arturo Borrero Gonzalez Signed-off-by: Pablo Neira Ayuso --- include/conntrackd.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/conntrackd.h') diff --git a/include/conntrackd.h b/include/conntrackd.h index f8b11a7..8406c54 100644 --- a/include/conntrackd.h +++ b/include/conntrackd.h @@ -110,6 +110,7 @@ struct ct_conf { int filter_from_kernelspace; int event_iterations_limit; int systemd; + int running_mode; struct { int error_queue_length; } channelc; -- cgit v1.2.3