output: reduce verbosity on info level

pull/2137/head
Victor Julien 9 years ago
parent 4c663bb143
commit 2aac437927

@ -261,20 +261,20 @@ OutputCtx *OutputFileLogInitSub(ConfNode *conf, OutputCtx *parent_ctx)
const char *force_filestore = ConfNodeLookupChildValue(conf, "force-filestore"); const char *force_filestore = ConfNodeLookupChildValue(conf, "force-filestore");
if (force_filestore != NULL && ConfValIsTrue(force_filestore)) { if (force_filestore != NULL && ConfValIsTrue(force_filestore)) {
FileForceFilestoreEnable(); FileForceFilestoreEnable();
SCLogInfo("forcing filestore of all files"); SCLogConfig("forcing filestore of all files");
} }
const char *force_magic = ConfNodeLookupChildValue(conf, "force-magic"); const char *force_magic = ConfNodeLookupChildValue(conf, "force-magic");
if (force_magic != NULL && ConfValIsTrue(force_magic)) { if (force_magic != NULL && ConfValIsTrue(force_magic)) {
FileForceMagicEnable(); FileForceMagicEnable();
SCLogInfo("forcing magic lookup for logged files"); SCLogConfig("forcing magic lookup for logged files");
} }
const char *force_md5 = ConfNodeLookupChildValue(conf, "force-md5"); const char *force_md5 = ConfNodeLookupChildValue(conf, "force-md5");
if (force_md5 != NULL && ConfValIsTrue(force_md5)) { if (force_md5 != NULL && ConfValIsTrue(force_md5)) {
#ifdef HAVE_NSS #ifdef HAVE_NSS
FileForceMd5Enable(); FileForceMd5Enable();
SCLogInfo("forcing md5 calculation for logged files"); SCLogConfig("forcing md5 calculation for logged files");
#else #else
SCLogInfo("md5 calculation requires linking against libnss"); SCLogInfo("md5 calculation requires linking against libnss");
#endif #endif

@ -112,14 +112,14 @@ int32_t CoredumpLoadConfig (void)
if (unlimited) { if (unlimited) {
/* we want no limit on coredump size */ /* we want no limit on coredump size */
if (lim.rlim_max == RLIM_INFINITY && lim.rlim_cur == RLIM_INFINITY) { 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; return 1;
} }
else { else {
new_lim.rlim_max = RLIM_INFINITY; new_lim.rlim_max = RLIM_INFINITY;
new_lim.rlim_cur = RLIM_INFINITY; new_lim.rlim_cur = RLIM_INFINITY;
if (setrlimit (RLIMIT_CORE, &new_lim) == 0) { if (setrlimit (RLIMIT_CORE, &new_lim) == 0) {
SCLogInfo ("Core dump size set to unlimited."); SCLogConfig ("Core dump size set to unlimited.");
return 1; return 1;
} }
if (errno == EPERM) { if (errno == EPERM) {
@ -169,7 +169,7 @@ int32_t CoredumpLoadConfig (void)
struct rlimit actual_lim; struct rlimit actual_lim;
if (getrlimit (RLIMIT_CORE, &actual_lim) == 0) { if (getrlimit (RLIMIT_CORE, &actual_lim) == 0) {
if (actual_lim.rlim_cur == RLIM_INFINITY) { 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 #ifdef RLIM_SAVED_CUR
else if (actual_lim.rlim_cur == RLIM_SAVED_CUR) { else if (actual_lim.rlim_cur == RLIM_SAVED_CUR) {

@ -214,7 +214,7 @@ int LiveBuildDeviceListCustom(const char *runmode, const char *itemname)
if ((!strcmp(subchild->name, itemname))) { if ((!strcmp(subchild->name, itemname))) {
if (!strcmp(subchild->val, "default")) if (!strcmp(subchild->val, "default"))
break; break;
SCLogInfo("Adding %s %s from config file", SCLogConfig("Adding %s %s from config file",
itemname, subchild->val); itemname, subchild->val);
LiveRegisterDevice(subchild->val); LiveRegisterDevice(subchild->val);
i++; i++;

@ -53,7 +53,8 @@ int MagicInit(void)
g_magic_ctx = magic_open(0); g_magic_ctx = magic_open(0);
if (g_magic_ctx == NULL) { 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; goto error;
} }
@ -62,15 +63,17 @@ int MagicInit(void)
if (filename != NULL) { if (filename != NULL) {
if (strlen(filename) == 0) { if (strlen(filename) == 0) {
/* set filename to NULL on *nix systems so magic_load uses system default path (see man libmagic) */ /* set filename to NULL on *nix systems so magic_load uses system
SCLogInfo("using system default magic-file"); * default path (see man libmagic) */
SCLogConfig("using system default magic-file");
filename = NULL; filename = NULL;
} }
else { else {
SCLogInfo("using magic-file %s", filename); SCLogConfig("using magic-file %s", filename);
if ( (fd = fopen(filename, "r")) == NULL) { 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; goto error;
} }
fclose(fd); fclose(fd);
@ -78,7 +81,8 @@ int MagicInit(void)
} }
if (magic_load(g_magic_ctx, filename) != 0) { 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; goto error;
} }

@ -1063,7 +1063,7 @@ void MpmHSGlobalCleanup(void)
{ {
SCMutexLock(&g_scratch_proto_mutex); SCMutexLock(&g_scratch_proto_mutex);
if (g_scratch_proto) { if (g_scratch_proto) {
SCLogInfo("Cleaning up Hyperscan global scratch"); SCLogPerf("Cleaning up Hyperscan global scratch");
hs_free_scratch(g_scratch_proto); hs_free_scratch(g_scratch_proto);
g_scratch_proto = NULL; g_scratch_proto = NULL;
} }
@ -1071,7 +1071,7 @@ void MpmHSGlobalCleanup(void)
SCMutexLock(&g_db_table_mutex); SCMutexLock(&g_db_table_mutex);
if (g_db_table != NULL) { if (g_db_table != NULL) {
SCLogInfo("Clearing Hyperscan database cache"); SCLogPerf("Clearing Hyperscan database cache");
HashTableFree(g_db_table); HashTableFree(g_db_table);
g_db_table = NULL; g_db_table = NULL;
} }

Loading…
Cancel
Save