eve-log: add warning if enabled but not supported

If we're not compiled against libjansson, the eve-log output is not
available. This patch adds a warning.
pull/840/head
Victor Julien 11 years ago
parent 33e4cc065f
commit c95df281e3

@ -558,7 +558,7 @@ void RunModeInitializeOutputs(void)
} }
if (strncmp(output->val, "unified-", sizeof("unified-") - 1) == 0) { if (strncmp(output->val, "unified-", sizeof("unified-") - 1) == 0) {
SCLogWarning(SC_ERR_INVALID_ARGUMENT, SCLogWarning(SC_ERR_NOT_SUPPORTED,
"Unified1 is no longer supported," "Unified1 is no longer supported,"
" use Unified2 instead " " use Unified2 instead "
"(see https://redmine.openinfosecfoundation.org/issues/353" "(see https://redmine.openinfosecfoundation.org/issues/353"
@ -566,11 +566,19 @@ void RunModeInitializeOutputs(void)
continue; continue;
} else if (strcmp(output->val, "alert-prelude") == 0) { } else if (strcmp(output->val, "alert-prelude") == 0) {
#ifndef PRELUDE #ifndef PRELUDE
SCLogWarning(SC_ERR_INVALID_ARGUMENT, SCLogWarning(SC_ERR_NOT_SUPPORTED,
"Prelude support not compiled in. Reconfigure/" "Prelude support not compiled in. Reconfigure/"
"recompile with --enable-prelude to add Prelude " "recompile with --enable-prelude to add Prelude "
"support."); "support.");
continue; continue;
#endif
} else if (strcmp(output->val, "eve-log") == 0) {
#ifndef HAVE_LIBJANSSON
SCLogWarning(SC_ERR_NOT_SUPPORTED,
"Eve-log support not compiled in. Reconfigure/"
"recompile with libjansson and its development "
"files installed to add eve-log support.");
continue;
#endif #endif
} }

Loading…
Cancel
Save