diff --git a/src/util-error.c b/src/util-error.c index b7fc7b9293..105add555d 100644 --- a/src/util-error.c +++ b/src/util-error.c @@ -334,6 +334,7 @@ const char * SCErrorToString(SCError err) CASE_CODE (SC_ERR_DIR_OPEN); CASE_CODE(SC_WARN_REMOVE_FILE); CASE_CODE (SC_ERR_NO_MAGIC_SUPPORT); + CASE_CODE (SC_ERR_REDIS); } return "UNKNOWN_ERROR"; diff --git a/src/util-error.h b/src/util-error.h index 2a825b18ba..acaec81625 100644 --- a/src/util-error.h +++ b/src/util-error.h @@ -324,6 +324,7 @@ typedef enum { SC_ERR_DIR_OPEN, SC_WARN_REMOVE_FILE, SC_ERR_NO_MAGIC_SUPPORT, + SC_ERR_REDIS, } SCError; const char *SCErrorToString(SCError); diff --git a/src/util-logopenfile.c b/src/util-logopenfile.c index 8eac7e1ee0..636aaab83f 100644 --- a/src/util-logopenfile.c +++ b/src/util-logopenfile.c @@ -280,6 +280,15 @@ SCConfLogOpenGeneric(ConfNode *conf, log_ctx->pcie_fp = SCLogOpenPcieFp(log_ctx, log_path, append); if (log_ctx->pcie_fp == NULL) return -1; // Error already logged by Open...Fp routine +#ifdef HAVE_LIBHIREDIS + } else if (strcasecmp(filetype, "redis") == 0) { + ConfNode *redis_node = ConfNodeLookupChild(conf, "redis"); + if (SCConfLogOpenRedis(redis_node, log_ctx) < 0) { + SCLogError(SC_ERR_REDIS, "failed to open redis output"); + return -1; + } + log_ctx->type = LOGFILE_TYPE_REDIS; +#endif } else { SCLogError(SC_ERR_INVALID_YAML_CONF_ENTRY, "Invalid entry for " "%s.filetype. Expected \"regular\" (default), \"unix_stream\", "