Go to the documentation of this file.
24 #ifndef SURICATA_UTIL_LOGOPENFILE_H
25 #define SURICATA_UTIL_LOGOPENFILE_H
32 #ifdef HAVE_LIBHIREDIS
80 #ifdef HAVE_LIBHIREDIS
87 #ifdef HAVE_LIBHIREDIS
88 RedisSetup redis_setup;
178 #define LOGFILE_RECONN_MIN_TIME 500
181 #define LOGFILE_ROTATE_INTERVAL 0x04
184 #define LOGFILE_EVE_BUFFER_SIZE 0
struct LogFileCtx_ LogFileCtx
void LogFileUnregister(LogFileCtx *ctx)
Unregister a LogFileCtx from maintenance operations.
bool SCLogOpenThreadedFile(const char *log_path, const char *append, LogFileCtx *parent_ctx)
void LogFileRegister(LogFileCtx *ctx)
Register a LogFileCtx for maintenance operations.
struct LogThreadedFileCtx_ LogThreadedFileCtx
struct LogFileEntry_ LogFileEntry
struct LogFileTypeCtx_ LogFileTypeCtx
int(* Write)(const char *buffer, int buffer_len, struct LogFileCtx_ *fp)
void LogFileFlush(LogFileCtx *file_ctx)
void LogFileFlushAll(void)
Flush all registered LogFileCtx instances.
struct ThreadLogFileHashEntry ThreadLogFileHashEntry
ThreadId internal_thread_id
LogThreadedFileCtx * threads
@ LOGFILE_TYPE_UNIX_DGRAM
@ LOGFILE_TYPE_UNIX_STREAM
int LogFileWrite(LogFileCtx *file_ctx, MemBuffer *buffer)
uint64_t bytes_since_last_flush
struct LogFileCtx_ * parent
int LogFileFreeCtx(LogFileCtx *)
LogFileFreeCtx() Destroy a LogFileCtx (Close the file and free memory)
int SCConfLogOpenGeneric(SCConfNode *conf, LogFileCtx *, const char *, int)
open a generic output "log file", which may be a regular file or a socket
void(* Flush)(struct LogFileCtx_ *fp)
ThreadLogFileHashEntry * entry
int SCConfLogReopen(LogFileCtx *)
Reopen a regular log file with the side-affect of truncating it.
LogFileCtx * LogFileEnsureExists(ThreadId thread_id, LogFileCtx *lf_ctx)
LogFileEnsureExists() Ensure a log file context for the thread exists.
void(* Close)(struct LogFileCtx_ *fp)
void(* Rotate)(struct LogFileCtx_ *fp)
TAILQ_ENTRY(LogFileEntry_) entries
LogFileCtx * LogFileNewCtx(void)
LogFileNewCtx() Get a new LogFileCtx.
Structure used to define an EVE output file type.
void LogFileRotateAll(void)
Check rotation for all registered LogFileCtx instances.