Go to the documentation of this file.
66 void *state,
void *tx, uint64_t tx_id)
77 if (!rs_template_logger_log(tx, js)) {
91 static void OutputTemplateLogDeInitCtxSub(
OutputCtx *output_ctx)
104 if (
unlikely(templatelog_ctx == NULL)) {
107 templatelog_ctx->
eve_ctx = ajt;
114 output_ctx->
data = templatelog_ctx;
115 output_ctx->
DeInit = OutputTemplateLogDeInitCtxSub;
117 SCLogNotice(
"Template log sub-module initialized.");
121 result.
ctx = output_ctx;
126 static TmEcode JsonTemplateLogThreadInit(
ThreadVars *t,
const void *initdata,
void **data)
133 if (initdata == NULL) {
134 SCLogDebug(
"Error getting context for EveLogTemplate. \"initdata\" is NULL.");
143 *data = (
void *)thread;
155 if (thread == NULL) {
166 if (
ConfGetNode(
"app-layer.protocols.template") == NULL) {
173 JsonTemplateLogThreadInit, JsonTemplateLogThreadDeinit, NULL);
void FreeEveThreadCtx(OutputJsonThreadCtx *ctx)
ConfNode * ConfGetNode(const char *name)
Get a ConfNode by name.
int OutputJsonBuilderBuffer(JsonBuilder *js, OutputJsonThreadCtx *ctx)
OutputJsonThreadCtx * CreateEveThreadCtx(ThreadVars *t, OutputJsonCtx *ctx)
struct LogTemplateLogThread_ LogTemplateLogThread
LogTemplateFileCtx * templatelog_ctx
void AppLayerParserRegisterLogger(uint8_t ipproto, AppProto alproto)
JsonBuilder * CreateEveHeader(const Packet *p, enum OutputJsonLogDirection dir, const char *event_type, JsonAddrInfo *addr, OutputJsonCtx *eve_ctx)
Per thread variable structure.
OutputJsonThreadCtx * ctx
void(* DeInit)(struct OutputCtx_ *)
void OutputRegisterTxSubModule(LoggerId id, const char *parent_name, const char *name, const char *conf_name, OutputInitSubFunc InitFunc, AppProto alproto, TxLogger TxLogFunc, ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit, ThreadExitPrintStatsFunc ThreadExitPrintStats)
void JsonTemplateLogRegister(void)
#define SCLogNotice(...)
Macro used to log NOTICE messages.
struct LogTemplateFileCtx_ LogTemplateFileCtx