Go to the documentation of this file.
24 #ifndef __UTIL_LOGOPENFILE_H__
25 #define __UTIL_LOGOPENFILE_H__
30 #ifdef HAVE_LIBHIREDIS
66 #ifdef HAVE_LIBHIREDIS
73 #ifdef HAVE_LIBHIREDIS
74 RedisSetup redis_setup;
156 #define LOGFILE_RECONN_MIN_TIME 500
159 #define LOGFILE_HEADER_WRITTEN 0x01
160 #define LOGFILE_ALERTS_PRINTED 0x02
161 #define LOGFILE_ROTATE_INTERVAL 0x04
struct LogFileCtx_ LogFileCtx
struct LogFileCtx_ ** lf_slots
struct LogThreadedFileCtx_ LogThreadedFileCtx
int(* Write)(const char *buffer, int buffer_len, struct LogFileCtx_ *fp)
SCPluginFileType * plugin
struct SyslogSetup_ SyslogSetup
LogFileCtx * LogFileEnsureExists(LogFileCtx *lf_ctx, int thread_id)
LogFileEnsureExists() Ensure a log file context for the thread exists.
LogThreadedFileCtx * threads
@ LOGFILE_TYPE_UNIX_DGRAM
@ LOGFILE_TYPE_UNIX_STREAM
int LogFileWrite(LogFileCtx *file_ctx, MemBuffer *buffer)
struct LogFileCtx_ * parent
int LogFileFreeCtx(LogFileCtx *)
LogFileFreeCtx() Destroy a LogFileCtx (Close the file and free memory)
int SCConfLogOpenGeneric(ConfNode *conf, LogFileCtx *, const char *, int)
open a generic output "log file", which may be a regular file or a socket
int SCConfLogReopen(LogFileCtx *)
Reopen a regular log file with the side-affect of truncating it.
void(* Close)(struct LogFileCtx_ *fp)
LogFileCtx * LogFileNewCtx(void)
LogFileNewCtx() Get a new LogFileCtx.