|
|
|
@ -562,47 +562,47 @@ static void SetupOutput(const char *name, OutputModule *module, OutputCtx *outpu
|
|
|
|
|
TAILQ_INSERT_TAIL(&RunModeOutputs, runmode_output, entries);
|
|
|
|
|
SCLogDebug("__tx_logger__ added");
|
|
|
|
|
}
|
|
|
|
|
} else if (module->FileLogFunc) {
|
|
|
|
|
SCLogDebug("%s is a file logger", module->name);
|
|
|
|
|
OutputRegisterFileLogger(module->name, module->FileLogFunc, output_ctx);
|
|
|
|
|
} else if (module->FiledataLogFunc) {
|
|
|
|
|
SCLogDebug("%s is a filedata logger", module->name);
|
|
|
|
|
OutputRegisterFiledataLogger(module->name, module->FiledataLogFunc, output_ctx);
|
|
|
|
|
|
|
|
|
|
/* need one instance of the tx logger module */
|
|
|
|
|
if (file_logger_module == NULL) {
|
|
|
|
|
file_logger_module = TmModuleGetByName("__file_logger__");
|
|
|
|
|
if (file_logger_module == NULL) {
|
|
|
|
|
if (filedata_logger_module == NULL) {
|
|
|
|
|
filedata_logger_module = TmModuleGetByName("__filedata_logger__");
|
|
|
|
|
if (filedata_logger_module == NULL) {
|
|
|
|
|
SCLogError(SC_ERR_INVALID_ARGUMENT,
|
|
|
|
|
"TmModuleGetByName for __file_logger__ failed");
|
|
|
|
|
"TmModuleGetByName for __filedata_logger__ failed");
|
|
|
|
|
exit(EXIT_FAILURE);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
RunModeOutput *runmode_output = SCCalloc(1, sizeof(RunModeOutput));
|
|
|
|
|
if (unlikely(runmode_output == NULL))
|
|
|
|
|
return;
|
|
|
|
|
runmode_output->tm_module = file_logger_module;
|
|
|
|
|
runmode_output->tm_module = filedata_logger_module;
|
|
|
|
|
runmode_output->output_ctx = NULL;
|
|
|
|
|
TAILQ_INSERT_TAIL(&RunModeOutputs, runmode_output, entries);
|
|
|
|
|
SCLogDebug("__file_logger__ added");
|
|
|
|
|
SCLogDebug("__filedata_logger__ added");
|
|
|
|
|
}
|
|
|
|
|
} else if (module->FiledataLogFunc) {
|
|
|
|
|
SCLogDebug("%s is a filedata logger", module->name);
|
|
|
|
|
OutputRegisterFiledataLogger(module->name, module->FiledataLogFunc, output_ctx);
|
|
|
|
|
} else if (module->FileLogFunc) {
|
|
|
|
|
SCLogDebug("%s is a file logger", module->name);
|
|
|
|
|
OutputRegisterFileLogger(module->name, module->FileLogFunc, output_ctx);
|
|
|
|
|
|
|
|
|
|
/* need one instance of the tx logger module */
|
|
|
|
|
if (filedata_logger_module == NULL) {
|
|
|
|
|
filedata_logger_module = TmModuleGetByName("__filedata_logger__");
|
|
|
|
|
if (filedata_logger_module == NULL) {
|
|
|
|
|
if (file_logger_module == NULL) {
|
|
|
|
|
file_logger_module = TmModuleGetByName("__file_logger__");
|
|
|
|
|
if (file_logger_module == NULL) {
|
|
|
|
|
SCLogError(SC_ERR_INVALID_ARGUMENT,
|
|
|
|
|
"TmModuleGetByName for __filedata_logger__ failed");
|
|
|
|
|
"TmModuleGetByName for __file_logger__ failed");
|
|
|
|
|
exit(EXIT_FAILURE);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
RunModeOutput *runmode_output = SCCalloc(1, sizeof(RunModeOutput));
|
|
|
|
|
if (unlikely(runmode_output == NULL))
|
|
|
|
|
return;
|
|
|
|
|
runmode_output->tm_module = filedata_logger_module;
|
|
|
|
|
runmode_output->tm_module = file_logger_module;
|
|
|
|
|
runmode_output->output_ctx = NULL;
|
|
|
|
|
TAILQ_INSERT_TAIL(&RunModeOutputs, runmode_output, entries);
|
|
|
|
|
SCLogDebug("__filedata_logger__ added");
|
|
|
|
|
SCLogDebug("__file_logger__ added");
|
|
|
|
|
}
|
|
|
|
|
} else if (module->StreamingLogFunc) {
|
|
|
|
|
SCLogDebug("%s is a streaming logger", module->name);
|
|
|
|
|