]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
suricata: info message after log init
authorEric Leblond <eric@regit.org>
Thu, 3 Oct 2013 11:50:09 +0000 (13:50 +0200)
committerEric Leblond <eric@regit.org>
Thu, 3 Oct 2013 12:45:16 +0000 (14:45 +0200)
This patch moves version display after log init so we can have an
homogeneous display.

src/suricata.c

index 1c86ca17acbca15c4de9582e18f8bebdf76ac0a1..c3ae657106d0b80bacb81b6594101b29e3227e05 100644 (file)
@@ -918,6 +918,18 @@ static TmEcode PrintVersion()
     return TM_ECODE_OK;
 }
 
+static TmEcode SCPrintVersion()
+{
+#ifdef REVISION
+    SCLogNotice("This is %s version %s (rev %s)", PROG_NAME, PROG_VER, xstr(REVISION));
+#elif defined RELEASE
+    SCLogNotice("This is %s version %s RELEASE", PROG_NAME, PROG_VER);
+#else
+    SCLogNotice("This is %s version %s", PROG_NAME, PROG_VER);
+#endif
+    return TM_ECODE_OK;
+}
+
 static void SCSetStartTime(SCInstance *suri)
 {
     memset(&suri->start_time, 0, sizeof(suri->start_time));
@@ -1856,10 +1868,6 @@ int main(int argc, char **argv)
     if (suri.run_mode == RUNMODE_UNITTEST)
         return RunUnittests(0, suri.regex_arg);
 
-    PrintVersion();
-
-    UtilCpuPrintSummary();
-
 #ifdef __SC_CUDA_SUPPORT__
     /* Init the CUDA environment */
     SCCudaInitCudaEnvironment();
@@ -1888,6 +1896,10 @@ int main(int argc, char **argv)
      * logging module. */
     SCLogLoadConfig(suri.daemon);
 
+    SCPrintVersion();
+
+    UtilCpuPrintSummary();
+
     /* load the pattern matchers */
     MpmTableSetup();
 #ifdef __SC_CUDA_SUPPORT__