]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect: suppress output
authorVictor Julien <victor@inliniac.net>
Wed, 25 Nov 2015 16:27:56 +0000 (17:27 +0100)
committerVictor Julien <victor@inliniac.net>
Tue, 5 Apr 2016 07:37:42 +0000 (09:37 +0200)
src/detect-engine-mpm.c

index 89cc643b90b4f9b849864211bb244669cf2e53b5..eb7edcbe54b513b28c8d38065e38c70e96a0eccd 100644 (file)
@@ -128,10 +128,14 @@ void DetectMpmInitializeAppMpms(DetectEngineCtx *de_ctx)
             shared = confshared;
 
         if (shared == 0) {
-            SCLogInfo("using unique mpm ctx' for %s", am->name);
+            if (!(de_ctx->flags & DE_QUIET)) {
+                SCLogInfo("using unique mpm ctx' for %s", am->name);
+            }
             am->sgh_mpm_context = MPM_CTX_FACTORY_UNIQUE_CONTEXT;
         } else {
-            SCLogInfo("using shared mpm ctx' for %s", am->name);
+            if (!(de_ctx->flags & DE_QUIET)) {
+                SCLogInfo("using shared mpm ctx' for %s", am->name);
+            }
             am->sgh_mpm_context = MpmFactoryRegisterMpmCtxProfile(de_ctx, am->name);
         }
 
@@ -821,16 +825,18 @@ void MpmStoreReportStats(const DetectEngineCtx *de_ctx)
         }
     }
 
-    uint32_t x;
-    for (x = 0; x < MPMB_MAX; x++) {
-        SCLogInfo("Builtin MPM \"%s\": %u", builtin_mpms[x], stats[x]);
-    }
-    for (x = 0; x < APP_MPMS_MAX; x++) {
-        if (appstats[x] == 0)
-            continue;
-        const char *name = app_mpms[x].name;
-        char *direction = app_mpms[x].direction == SIG_FLAG_TOSERVER ? "toserver" : "toclient";
-        SCLogInfo("AppLayer MPM \"%s %s\": %u", direction, name, appstats[x]);
+    if (!(de_ctx->flags & DE_QUIET)) {
+        uint32_t x;
+        for (x = 0; x < MPMB_MAX; x++) {
+            SCLogInfo("Builtin MPM \"%s\": %u", builtin_mpms[x], stats[x]);
+        }
+        for (x = 0; x < APP_MPMS_MAX; x++) {
+            if (appstats[x] == 0)
+                continue;
+            const char *name = app_mpms[x].name;
+            char *direction = app_mpms[x].direction == SIG_FLAG_TOSERVER ? "toserver" : "toclient";
+            SCLogInfo("AppLayer MPM \"%s %s\": %u", direction, name, appstats[x]);
+        }
     }
 }