syslog-ng source
logpipe.h File Reference
#include "syslog-ng.h"
#include "logmsg/logmsg.h"
#include "cfg.h"
#include "atomic.h"
#include "messages.h"
Include dependency graph for logpipe.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  LogPathOptions
 
struct  LogPipeOptions
 
struct  LogPipe
 

Macros

#define NC_CLOSE   1
 
#define NC_READ_ERROR   2
 
#define NC_WRITE_ERROR   3
 
#define NC_FILE_MOVED   4
 
#define NC_FILE_EOF   5
 
#define NC_REOPEN_REQUIRED   6
 
#define NC_FILE_DELETED   7
 
#define NC_FILE_MODIFIED   8
 
#define NC_AGAIN   9
 
#define NC_LOGROTATE   10
 
#define NR_OK   0x0000
 
#define NR_ERROR   0x0001
 
#define NR_STOP_ON_EOF   0x0002
 
#define PIF_INITIALIZED   0x0001
 
#define PIF_INLINED   0x0002
 
#define PIF_SOURCE   0x0004
 
#define PIF_BRANCH_FINAL   0x0008
 
#define PIF_BRANCH_FALLBACK   0x0010
 
#define PIF_BRANCH_PROPERTIES   (PIF_BRANCH_FINAL + PIF_BRANCH_FALLBACK)
 
#define PIF_HARD_FLOW_CONTROL   0x0020
 
#define PIF_CONDITIONAL_MIDPOINT   0x0040
 
#define PIF_JUNCTION_END   0x0080
 
#define PIF_CONFIG_RELATED   0x0100
 
#define PIF_PRIVATE(x)   ((x) << 16)
 
#define LOG_PATH_OPTIONS_INIT   { TRUE, FALSE, NULL, NULL }
 
#define LOG_PATH_OPTIONS_INIT_NOACK   { FALSE, FALSE, NULL, NULL }
 

Functions

 G_STATIC_ASSERT (G_STRUCT_OFFSET(LogPipe, queue) - G_STRUCT_OFFSET(LogPipe, flags)<=4)
 
LogPipe * log_pipe_ref (LogPipe *self)
 
gboolean log_pipe_unref (LogPipe *self)
 
LogPipe * log_pipe_new (GlobalConfig *cfg)
 
void log_pipe_init_instance (LogPipe *self, GlobalConfig *cfg)
 
void log_pipe_clone_method (LogPipe *dst, const LogPipe *src)
 
void log_pipe_forward_notify (LogPipe *self, gint notify_code, gpointer user_data)
 
EVTTAG * log_pipe_location_tag (LogPipe *pipe)
 
void log_pipe_attach_expr_node (LogPipe *self, LogExprNode *expr_node)
 
void log_pipe_detach_expr_node (LogPipe *self)
 
void log_pipe_set_persist_name (LogPipe *self, const gchar *persist_name)
 
const gchar * log_pipe_get_persist_name (const LogPipe *self)
 
void log_pipe_queue (LogPipe *s, LogMessage *msg, const LogPathOptions *path_options)
 
void log_pipe_forward_msg (LogPipe *self, LogMessage *msg, const LogPathOptions *path_options)
 
void log_pipe_set_options (LogPipe *self, const LogPipeOptions *options)
 
void log_pipe_set_internal (LogPipe *self, gboolean internal)
 
gboolean log_pipe_is_internal (const LogPipe *self)
 
void log_pipe_free_method (LogPipe *s)
 
void log_pipe_add_info (LogPipe *self, const gchar *info)
 

Variables

gboolean(* pipe_single_step_hook )(LogPipe *pipe, LogMessage *msg, const LogPathOptions *path_options)
 

Macro Definition Documentation

◆ LOG_PATH_OPTIONS_INIT

#define LOG_PATH_OPTIONS_INIT   { TRUE, FALSE, NULL, NULL }

◆ LOG_PATH_OPTIONS_INIT_NOACK

#define LOG_PATH_OPTIONS_INIT_NOACK   { FALSE, FALSE, NULL, NULL }

◆ NC_AGAIN

#define NC_AGAIN   9

◆ NC_CLOSE

#define NC_CLOSE   1

◆ NC_FILE_DELETED

#define NC_FILE_DELETED   7

◆ NC_FILE_EOF

#define NC_FILE_EOF   5

◆ NC_FILE_MODIFIED

#define NC_FILE_MODIFIED   8

◆ NC_FILE_MOVED

#define NC_FILE_MOVED   4

◆ NC_LOGROTATE

#define NC_LOGROTATE   10

◆ NC_READ_ERROR

#define NC_READ_ERROR   2

◆ NC_REOPEN_REQUIRED

#define NC_REOPEN_REQUIRED   6

◆ NC_WRITE_ERROR

#define NC_WRITE_ERROR   3

◆ NR_ERROR

#define NR_ERROR   0x0001

◆ NR_OK

#define NR_OK   0x0000

◆ NR_STOP_ON_EOF

#define NR_STOP_ON_EOF   0x0002

◆ PIF_BRANCH_FALLBACK

#define PIF_BRANCH_FALLBACK   0x0010

◆ PIF_BRANCH_FINAL

#define PIF_BRANCH_FINAL   0x0008

◆ PIF_BRANCH_PROPERTIES

#define PIF_BRANCH_PROPERTIES   (PIF_BRANCH_FINAL + PIF_BRANCH_FALLBACK)

◆ PIF_CONDITIONAL_MIDPOINT

#define PIF_CONDITIONAL_MIDPOINT   0x0040

◆ PIF_CONFIG_RELATED

#define PIF_CONFIG_RELATED   0x0100

◆ PIF_HARD_FLOW_CONTROL

#define PIF_HARD_FLOW_CONTROL   0x0020

◆ PIF_INITIALIZED

#define PIF_INITIALIZED   0x0001

◆ PIF_INLINED

#define PIF_INLINED   0x0002

◆ PIF_JUNCTION_END

#define PIF_JUNCTION_END   0x0080

◆ PIF_PRIVATE

#define PIF_PRIVATE (   x)    ((x) << 16)

◆ PIF_SOURCE

#define PIF_SOURCE   0x0004

Function Documentation

◆ G_STATIC_ASSERT()

G_STATIC_ASSERT ( G_STRUCT_OFFSET(LogPipe, queue) - G_STRUCT_OFFSET(LogPipe, flags)<=  4)

◆ log_pipe_add_info()

void log_pipe_add_info ( LogPipe *  self,
const gchar *  info 
)

◆ log_pipe_attach_expr_node()

void log_pipe_attach_expr_node ( LogPipe *  self,
LogExprNode *  expr_node 
)

◆ log_pipe_clone_method()

void log_pipe_clone_method ( LogPipe *  dst,
const LogPipe *  src 
)

◆ log_pipe_detach_expr_node()

void log_pipe_detach_expr_node ( LogPipe *  self)

◆ log_pipe_forward_msg()

void log_pipe_forward_msg ( LogPipe *  self,
LogMessage *  msg,
const LogPathOptions *  path_options 
)

◆ log_pipe_forward_notify()

void log_pipe_forward_notify ( LogPipe *  self,
gint  notify_code,
gpointer  user_data 
)

◆ log_pipe_free_method()

void log_pipe_free_method ( LogPipe *  s)

◆ log_pipe_get_persist_name()

const gchar* log_pipe_get_persist_name ( const LogPipe *  self)

◆ log_pipe_init_instance()

void log_pipe_init_instance ( LogPipe *  self,
GlobalConfig *  cfg 
)

◆ log_pipe_is_internal()

gboolean log_pipe_is_internal ( const LogPipe *  self)

◆ log_pipe_location_tag()

EVTTAG* log_pipe_location_tag ( LogPipe *  pipe)

◆ log_pipe_new()

LogPipe* log_pipe_new ( GlobalConfig *  cfg)

◆ log_pipe_queue()

void log_pipe_queue ( LogPipe *  s,
LogMessage *  msg,
const LogPathOptions *  path_options 
)

◆ log_pipe_ref()

LogPipe* log_pipe_ref ( LogPipe *  self)

◆ log_pipe_set_internal()

void log_pipe_set_internal ( LogPipe *  self,
gboolean  internal 
)

◆ log_pipe_set_options()

void log_pipe_set_options ( LogPipe *  self,
const LogPipeOptions *  options 
)

◆ log_pipe_set_persist_name()

void log_pipe_set_persist_name ( LogPipe *  self,
const gchar *  persist_name 
)

◆ log_pipe_unref()

gboolean log_pipe_unref ( LogPipe *  self)

Variable Documentation

◆ pipe_single_step_hook

gboolean(* pipe_single_step_hook) (LogPipe *pipe, LogMessage *msg, const LogPathOptions *path_options) ( LogPipe *  pipe,
LogMessage *  msg,
const LogPathOptions *  path_options 
)
extern