|
|
@ -39,10 +39,7 @@ TmEcode OutputJSON(json_t *js, void *data, uint64_t *count);
|
|
|
|
int OutputJSONBuffer(json_t *js, LogFileCtx *file_ctx, MemBuffer *buffer);
|
|
|
|
int OutputJSONBuffer(json_t *js, LogFileCtx *file_ctx, MemBuffer *buffer);
|
|
|
|
OutputCtx *OutputJsonInitCtx(ConfNode *);
|
|
|
|
OutputCtx *OutputJsonInitCtx(ConfNode *);
|
|
|
|
|
|
|
|
|
|
|
|
enum JsonOutput { ALERT_FILE,
|
|
|
|
|
|
|
|
ALERT_SYSLOG,
|
|
|
|
|
|
|
|
ALERT_UNIX_DGRAM,
|
|
|
|
|
|
|
|
ALERT_UNIX_STREAM };
|
|
|
|
|
|
|
|
enum JsonFormat { COMPACT, INDENT };
|
|
|
|
enum JsonFormat { COMPACT, INDENT };
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
@ -50,11 +47,10 @@ enum JsonFormat { COMPACT, INDENT };
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
typedef struct OutputJsonCtx_ {
|
|
|
|
typedef struct OutputJsonCtx_ {
|
|
|
|
LogFileCtx *file_ctx;
|
|
|
|
LogFileCtx *file_ctx;
|
|
|
|
enum JsonOutput json_out;
|
|
|
|
enum LogFileType json_out;
|
|
|
|
enum JsonFormat format;
|
|
|
|
enum JsonFormat format;
|
|
|
|
} OutputJsonCtx;
|
|
|
|
} OutputJsonCtx;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct AlertJsonThread_ {
|
|
|
|
typedef struct AlertJsonThread_ {
|
|
|
|
/** LogFileCtx has the pointer to the file and a mutex to allow multithreading */
|
|
|
|
/** LogFileCtx has the pointer to the file and a mutex to allow multithreading */
|
|
|
|
LogFileCtx *file_ctx;
|
|
|
|
LogFileCtx *file_ctx;
|
|
|
|