syslog-ng source
LogExprNode Struct Reference

#include <cfg-tree.h>

Collaboration diagram for LogExprNode:

Public Attributes

GAtomicCounter ref_cnt
 
gint16 layout
 
gint16 content
 
guint32 flags
 
gchar * name
 
LogExprNode * parent
 
LogExprNode * children
 
LogExprNode * next
 
gpointer object
 
GDestroyNotify object_destroy
 
gpointer aux
 
GDestroyNotify aux_destroy
 
gchar * filename
 
gint line
 
gint column
 
gint child_id
 

Detailed Description

Log Expressions

Everything except a few things are parsed from the configuration as a log expression. The few exceptions are: templates, global options and blocks.

Sources, destinations, filters, parsers, rewrite rules and global log statements are log expressions.

Log expressions describe a graph, which is then traversed by messages received by syslog-ng. The graph used to be a tree (e.g. no cycles), but this limitation was lifted in syslog-ng 3.4, when the concept of log expression was introduced.

Log expression is a part of the graph, the larger graph is created by connecting these parts as dictated by the configuration.

Each log expression is represented using a tree of LogExprNode elements. Each node in this tree defines the layout how its children are to be connected:

  • simple element: holds a single LogPipe, no children
  • reference: used to reference log expressions defined elsewhere, no children
  • sequence: holds a sequence of LogExprNodes
  • junction: holds a junction
  • conditional: holds a conditional (simple or compound if), three children: filter, true_expr, false_expr

Sometimes syslog-ng needs to know what kind of object the user originally defined, this is stored in the "content" member.

ENC_PIPE: content is a single LogPipe instance (in the "object" member) ENC_SOURCE: content is a source log expression node (source statement or one defined inline) ENC_DESTINATION: content is a destination node ENC_FILTER: content is a filter node ENC_PARSER: content is a parser node ENC_REWRITE: content is a rewrite node

Member Data Documentation

◆ aux

gpointer LogExprNode::aux

◆ aux_destroy

GDestroyNotify LogExprNode::aux_destroy

◆ child_id

gint LogExprNode::child_id

◆ children

LogExprNode* LogExprNode::children

◆ column

gint LogExprNode::column

◆ content

gint16 LogExprNode::content

◆ filename

gchar* LogExprNode::filename

◆ flags

guint32 LogExprNode::flags

◆ layout

gint16 LogExprNode::layout

◆ line

gint LogExprNode::line

◆ name

gchar* LogExprNode::name

◆ next

LogExprNode* LogExprNode::next

◆ object

gpointer LogExprNode::object

◆ object_destroy

GDestroyNotify LogExprNode::object_destroy

◆ parent

LogExprNode* LogExprNode::parent

◆ ref_cnt

GAtomicCounter LogExprNode::ref_cnt

The documentation for this struct was generated from the following file: