static int file_logger_count = 0;
static int filedata_logger_count = 0;
-static LoggerId logger_bits[ALPROTO_MAX];
int RunModeOutputFiledataEnabled(void)
{
}
/** \brief Turn output into thread module */
-static void SetupOutput(const char *name, OutputModule *module, OutputCtx *output_ctx)
+static void SetupOutput(
+ const char *name, OutputModule *module, OutputCtx *output_ctx, LoggerId *logger_bits)
{
/* flow logger doesn't run in the packet path */
if (module->FlowLogFunc) {
}
}
-static void RunModeInitializeEveOutput(ConfNode *conf, OutputCtx *parent_ctx)
+static void RunModeInitializeEveOutput(ConfNode *conf, OutputCtx *parent_ctx, LoggerId *logger_bits)
{
ConfNode *types = ConfNodeLookupChild(conf, "types");
SCLogDebug("types %p", types);
}
AddOutputToFreeList(sub_module, result.ctx);
- SetupOutput(sub_module->name, sub_module,
- result.ctx);
+ SetupOutput(sub_module->name, sub_module, result.ctx, logger_bits);
}
}
}
}
-static void RunModeInitializeLuaOutput(ConfNode *conf, OutputCtx *parent_ctx)
+static void RunModeInitializeLuaOutput(ConfNode *conf, OutputCtx *parent_ctx, LoggerId *logger_bits)
{
OutputModule *lua_module = OutputGetModuleByConfName("lua");
BUG_ON(lua_module == NULL);
}
AddOutputToFreeList(m, result.ctx);
- SetupOutput(m->name, m, result.ctx);
+ SetupOutput(m->name, m, result.ctx, logger_bits);
}
}
char tls_log_enabled = 0;
char tls_store_present = 0;
- memset(&logger_bits, 0, sizeof(logger_bits));
-
+ // ALPROTO_MAX is set to its final value
+ LoggerId logger_bits[ALPROTO_MAX] = { 0 };
TAILQ_FOREACH(output, &outputs->head, next) {
output_config = ConfNodeLookupChild(output, output->val);
// TODO if module == parent, find it's children
if (strcmp(output->val, "eve-log") == 0) {
- RunModeInitializeEveOutput(output_config, output_ctx);
+ RunModeInitializeEveOutput(output_config, output_ctx, logger_bits);
/* add 'eve-log' to free list as it's the owner of the
* main output ctx from which the sub-modules share the
SCLogDebug("handle lua");
if (output_ctx == NULL)
continue;
- RunModeInitializeLuaOutput(output_config, output_ctx);
+ RunModeInitializeLuaOutput(output_config, output_ctx, logger_bits);
AddOutputToFreeList(module, output_ctx);
} else {
AddOutputToFreeList(module, output_ctx);
- SetupOutput(module->name, module, output_ctx);
+ SetupOutput(module->name, module, output_ctx, logger_bits);
}
}
if (count == 0) {
}
AddOutputToFreeList(module, output_ctx);
- SetupOutput(module->name, module, output_ctx);
+ SetupOutput(module->name, module, output_ctx, logger_bits);
}
}
}