int OutputJSONBuffer(json_t *js, LogFileCtx *file_ctx, MemBuffer *buffer);
OutputCtx *OutputJsonInitCtx(ConfNode *);
-enum JsonOutput { ALERT_FILE,
- ALERT_SYSLOG,
- ALERT_UNIX_DGRAM,
- ALERT_UNIX_STREAM };
+
enum JsonFormat { COMPACT, INDENT };
/*
*/
typedef struct OutputJsonCtx_ {
LogFileCtx *file_ctx;
- enum JsonOutput json_out;
+ enum LogFileType json_out;
enum JsonFormat format;
} OutputJsonCtx;
-
typedef struct AlertJsonThread_ {
/** LogFileCtx has the pointer to the file and a mutex to allow multithreading */
LogFileCtx *file_ctx;
uint16_t fileno;
} PcieFile;
+enum LogFileType { ALERT_FILE,
+ ALERT_SYSLOG,
+ ALERT_UNIX_DGRAM,
+ ALERT_UNIX_STREAM };
+
/** Global structure for Output Context */
typedef struct LogFileCtx_ {
union {
* record cannot be written to the file in one call */
SCMutex fp_mutex;
+ /** the type of file */
+ enum LogFileType type;
+
/** The name of the file */
char *filename;