path: root/src/main.c
diff options
authorArturo Borrero Gonzalez <>2016-10-28 08:57:08 +0200
committerPablo Neira Ayuso <>2016-10-28 10:06:19 +0200
commitab81c355fa292b7d71253a4b8d3a3daf31a78ed1 (patch)
tree0580d8442d53081ac8767090b3eb994821df6380 /src/main.c
parent9e94e85e10757aedd7f8dfdbea2ecafcbbb658fd (diff)
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 <>
Diffstat (limited to 'src/main.c')
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 2be9b2f..0319b5c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -150,6 +150,7 @@ int main(int argc, char *argv[])
switch(argv[i][1]) {
case 'd':
set_operation_mode(&type, DAEMON, argv);
+ CONFIG(running_mode) = DAEMON;
case 'c':
set_operation_mode(&type, REQUEST, argv);