From: Victor Julien Date: Wed, 25 Nov 2015 16:27:56 +0000 (+0100) Subject: detect: suppress output X-Git-Tag: suricata-3.1RC1~306 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b1d75f0bd67175415ed355eb477392d1a0d166f;p=thirdparty%2Fsuricata.git detect: suppress output --- diff --git a/src/detect-engine-mpm.c b/src/detect-engine-mpm.c index 89cc643b90..eb7edcbe54 100644 --- a/src/detect-engine-mpm.c +++ b/src/detect-engine-mpm.c @@ -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]); + } } }