Go to the documentation of this file.
66 void *state,
void *tx, uint64_t tx_id)
77 jb_open_object(js,
"template");
78 if (!rs_template_logger_log(tx, js)) {
93 static void OutputTemplateLogDeInitCtxSub(
OutputCtx *output_ctx)
106 if (
unlikely(templatelog_ctx == NULL)) {
109 templatelog_ctx->
eve_ctx = ajt;
116 output_ctx->
data = templatelog_ctx;
117 output_ctx->
DeInit = OutputTemplateLogDeInitCtxSub;
119 SCLogNotice(
"Template log sub-module initialized.");
123 result.
ctx = output_ctx;
128 static TmEcode JsonTemplateLogThreadInit(
ThreadVars *t,
const void *initdata,
void **data)
135 if (initdata == NULL) {
136 SCLogDebug(
"Error getting context for EveLogTemplate. \"initdata\" is NULL.");
145 *data = (
void *)thread;
157 if (thread == NULL) {
168 if (
ConfGetNode(
"app-layer.protocols.template") == NULL) {
175 JsonTemplateLogThreadInit, JsonTemplateLogThreadDeinit, NULL);
struct LogTemplateLogThread_ LogTemplateLogThread
LogTemplateFileCtx * templatelog_ctx
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)
void JsonTemplateRustLogRegister(void)
OutputJsonThreadCtx * 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.
struct LogTemplateFileCtx_ LogTemplateFileCtx
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)
#define SCLogNotice(...)
Macro used to log NOTICE messages.