]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
output: reduce verbosity on info level
authorVictor Julien <victor@inliniac.net>
Fri, 3 Jun 2016 07:45:23 +0000 (09:45 +0200)
committerVictor Julien <victor@inliniac.net>
Fri, 3 Jun 2016 07:45:23 +0000 (09:45 +0200)
src/output-json-file.c
src/util-coredump-config.c
src/util-device.c
src/util-magic.c
src/util-mpm-hs.c

index c4a7f5276bcb0e853b7457c0178c7db430d8962c..a06628225a3f25c006bd78f8bfaa349846a94899 100644 (file)
@@ -261,20 +261,20 @@ OutputCtx *OutputFileLogInitSub(ConfNode *conf, OutputCtx *parent_ctx)
         const char *force_filestore = ConfNodeLookupChildValue(conf, "force-filestore");
         if (force_filestore != NULL && ConfValIsTrue(force_filestore)) {
             FileForceFilestoreEnable();
-            SCLogInfo("forcing filestore of all files");
+            SCLogConfig("forcing filestore of all files");
         }
 
         const char *force_magic = ConfNodeLookupChildValue(conf, "force-magic");
         if (force_magic != NULL && ConfValIsTrue(force_magic)) {
             FileForceMagicEnable();
-            SCLogInfo("forcing magic lookup for logged files");
+            SCLogConfig("forcing magic lookup for logged files");
         }
 
         const char *force_md5 = ConfNodeLookupChildValue(conf, "force-md5");
         if (force_md5 != NULL && ConfValIsTrue(force_md5)) {
 #ifdef HAVE_NSS
             FileForceMd5Enable();
-            SCLogInfo("forcing md5 calculation for logged files");
+            SCLogConfig("forcing md5 calculation for logged files");
 #else
             SCLogInfo("md5 calculation requires linking against libnss");
 #endif
index 2115f930fbbeedbc18d8a758b8e9bc2b9d1c30dc..9555e0fd710329a4638c7792f54e3b27f7832eb8 100644 (file)
@@ -112,14 +112,14 @@ int32_t CoredumpLoadConfig (void)
     if (unlimited) {
         /* we want no limit on coredump size */
         if (lim.rlim_max == RLIM_INFINITY && lim.rlim_cur == RLIM_INFINITY) {
-            SCLogInfo ("Core dump size is unlimited.");
+            SCLogConfig ("Core dump size is unlimited.");
             return 1;
         }
         else {
             new_lim.rlim_max = RLIM_INFINITY;
             new_lim.rlim_cur = RLIM_INFINITY;
             if (setrlimit (RLIMIT_CORE, &new_lim) == 0) {
-                SCLogInfo ("Core dump size set to unlimited.");
+                SCLogConfig ("Core dump size set to unlimited.");
                 return 1;
             }
             if (errno == EPERM) {
@@ -169,7 +169,7 @@ int32_t CoredumpLoadConfig (void)
             struct rlimit actual_lim;
             if (getrlimit (RLIMIT_CORE, &actual_lim) == 0) {
                 if (actual_lim.rlim_cur == RLIM_INFINITY) {
-                    SCLogInfo ("Core dump size set to unlimited.");
+                    SCLogConfig ("Core dump size set to unlimited.");
                 }
 #ifdef RLIM_SAVED_CUR
                 else if (actual_lim.rlim_cur == RLIM_SAVED_CUR) {
index a4e634ee0c669f2dc18a559d0bff0ca58bbd8685..409f8732cc62133321b4a59d8d82cfd90d2ac5da 100644 (file)
@@ -214,7 +214,7 @@ int LiveBuildDeviceListCustom(const char *runmode, const char *itemname)
             if ((!strcmp(subchild->name, itemname))) {
                 if (!strcmp(subchild->val, "default"))
                     break;
-                SCLogInfo("Adding %s %s from config file",
+                SCLogConfig("Adding %s %s from config file",
                           itemname, subchild->val);
                 LiveRegisterDevice(subchild->val);
                 i++;
index 5d8615b182e49314d91485fcdead2a54607fec43..679545751f3ea73dd1b20dacb2a34a777b25f15b 100644 (file)
@@ -53,7 +53,8 @@ int MagicInit(void)
 
     g_magic_ctx = magic_open(0);
     if (g_magic_ctx == NULL) {
-        SCLogError(SC_ERR_MAGIC_OPEN, "magic_open failed: %s", magic_error(g_magic_ctx));
+        SCLogError(SC_ERR_MAGIC_OPEN, "magic_open failed: %s",
+                magic_error(g_magic_ctx));
         goto error;
     }
 
@@ -62,15 +63,17 @@ int MagicInit(void)
 
     if (filename != NULL) {
         if (strlen(filename) == 0) {
-            /* set filename to NULL on *nix systems so magic_load uses system default path (see man libmagic) */
-            SCLogInfo("using system default magic-file");
+            /* set filename to NULL on *nix systems so magic_load uses system
+             * default path (see man libmagic) */
+            SCLogConfig("using system default magic-file");
             filename = NULL;
         }
         else {
-            SCLogInfo("using magic-file %s", filename);
+            SCLogConfig("using magic-file %s", filename);
 
             if ( (fd = fopen(filename, "r")) == NULL) {
-                SCLogWarning(SC_ERR_FOPEN, "Error opening file: \"%s\": %s", filename, strerror(errno));
+                SCLogWarning(SC_ERR_FOPEN, "Error opening file: \"%s\": %s",
+                        filename, strerror(errno));
                 goto error;
             }
             fclose(fd);
@@ -78,7 +81,8 @@ int MagicInit(void)
     }
 
     if (magic_load(g_magic_ctx, filename) != 0) {
-        SCLogError(SC_ERR_MAGIC_LOAD, "magic_load failed: %s", magic_error(g_magic_ctx));
+        SCLogError(SC_ERR_MAGIC_LOAD, "magic_load failed: %s",
+                magic_error(g_magic_ctx));
         goto error;
     }
 
index 61a6c4cf89cc3e939bbf30c84bc84a0a3754c570..43e74d3142a836bbb66ca608505ab0f4deb67974 100644 (file)
@@ -1063,7 +1063,7 @@ void MpmHSGlobalCleanup(void)
 {
     SCMutexLock(&g_scratch_proto_mutex);
     if (g_scratch_proto) {
-        SCLogInfo("Cleaning up Hyperscan global scratch");
+        SCLogPerf("Cleaning up Hyperscan global scratch");
         hs_free_scratch(g_scratch_proto);
         g_scratch_proto = NULL;
     }
@@ -1071,7 +1071,7 @@ void MpmHSGlobalCleanup(void)
 
     SCMutexLock(&g_db_table_mutex);
     if (g_db_table != NULL) {
-        SCLogInfo("Clearing Hyperscan database cache");
+        SCLogPerf("Clearing Hyperscan database cache");
         HashTableFree(g_db_table);
         g_db_table = NULL;
     }