]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
suricata: reorder start
authorEric Leblond <eric@regit.org>
Thu, 3 Oct 2013 11:43:58 +0000 (13:43 +0200)
committerEric Leblond <eric@regit.org>
Thu, 3 Oct 2013 12:45:16 +0000 (14:45 +0200)
Initalizing output just after configuration file parsing allow to
log almost all messages accordingly to configuration.

src/suricata.c

index c8217693bf2e653c148fcaa15a656270b3f2abfa..1c86ca17acbca15c4de9582e18f8bebdf76ac0a1 100644 (file)
@@ -1884,6 +1884,10 @@ int main(int argc, char **argv)
         exit(EXIT_FAILURE);
     }
 
+    /* Since our config is now loaded we can finish configurating the
+     * logging module. */
+    SCLogLoadConfig(suri.daemon);
+
     /* load the pattern matchers */
     MpmTableSetup();
 #ifdef __SC_CUDA_SUPPORT__
@@ -1925,10 +1929,6 @@ int main(int argc, char **argv)
         NFQInitConfig(FALSE);
 #endif
 
-    /* Since our config is now loaded we can finish configurating the
-     * logging module. */
-    SCLogLoadConfig(suri.daemon);
-
     /* Load the Host-OS lookup. */
     SCHInfoLoadFromConfig();
     if (suri.run_mode != RUNMODE_UNIX_SOCKET) {