syslog-ng source
logmatcher.c File Reference
#include "logmatcher.h"
#include "messages.h"
#include "cfg.h"
#include "str-utils.h"
#include "scratch-buffers.h"
#include "compat/string.h"
#include "compat/pcre.h"
Include dependency graph for logmatcher.c:

Classes

struct  LogMatcherString
 
struct  LogMatcherGlob
 
struct  LogMatcherPcreRe
 
struct  LogMatcherPcreMatchResult
 

Typedefs

typedef LogMatcher *(* LogMatcherConstructFunc) (const LogMatcherOptions *options)
 

Functions

LogMatcher * log_matcher_string_new (const LogMatcherOptions *options)
 
LogMatcher * log_matcher_glob_new (const LogMatcherOptions *options)
 
LogMatcher * log_matcher_pcre_re_new (const LogMatcherOptions *options)
 
void log_matcher_pcre_set_nv_prefix (LogMatcher *s, const gchar *prefix)
 
gboolean log_matcher_match_value (LogMatcher *s, LogMessage *msg, gint value_handle)
 
gboolean log_matcher_match_buffer (LogMatcher *s, LogMessage *msg, const gchar *value, gssize value_len)
 
gboolean log_matcher_match_template (LogMatcher *s, LogMessage *msg, LogTemplate *template, LogTemplateEvalOptions *options)
 
LogMatcher * log_matcher_new (const LogMatcherOptions *options)
 
LogMatcher * log_matcher_ref (LogMatcher *s)
 
void log_matcher_unref (LogMatcher *s)
 
gboolean log_matcher_options_set_type (LogMatcherOptions *options, const gchar *type)
 
gboolean log_matcher_options_process_flag (LogMatcherOptions *self, const gchar *flag)
 
void log_matcher_options_defaults (LogMatcherOptions *options)
 
void log_matcher_options_init (LogMatcherOptions *options)
 
void log_matcher_options_destroy (LogMatcherOptions *options)
 
GQuark log_matcher_error_quark (void)
 

Variables

struct {
   const gchar *   name
 
   LogMatcherConstructFunc   construct
 
matcher_types []
 
CfgFlagHandler log_matcher_flag_handlers []
 

Typedef Documentation

◆ LogMatcherConstructFunc

typedef LogMatcher*(* LogMatcherConstructFunc) (const LogMatcherOptions *options)

Function Documentation

◆ log_matcher_error_quark()

GQuark log_matcher_error_quark ( void  )

◆ log_matcher_glob_new()

LogMatcher* log_matcher_glob_new ( const LogMatcherOptions options)

◆ log_matcher_match_buffer()

gboolean log_matcher_match_buffer ( LogMatcher *  s,
LogMessage *  msg,
const gchar *  value,
gssize  value_len 
)

◆ log_matcher_match_template()

gboolean log_matcher_match_template ( LogMatcher *  s,
LogMessage *  msg,
LogTemplate *  template,
LogTemplateEvalOptions options 
)

◆ log_matcher_match_value()

gboolean log_matcher_match_value ( LogMatcher *  s,
LogMessage *  msg,
gint  value_handle 
)

◆ log_matcher_new()

LogMatcher* log_matcher_new ( const LogMatcherOptions options)

◆ log_matcher_options_defaults()

void log_matcher_options_defaults ( LogMatcherOptions options)

◆ log_matcher_options_destroy()

void log_matcher_options_destroy ( LogMatcherOptions options)

◆ log_matcher_options_init()

void log_matcher_options_init ( LogMatcherOptions options)

◆ log_matcher_options_process_flag()

gboolean log_matcher_options_process_flag ( LogMatcherOptions self,
const gchar *  flag 
)

◆ log_matcher_options_set_type()

gboolean log_matcher_options_set_type ( LogMatcherOptions options,
const gchar *  type 
)

◆ log_matcher_pcre_re_new()

LogMatcher* log_matcher_pcre_re_new ( const LogMatcherOptions options)

◆ log_matcher_pcre_set_nv_prefix()

void log_matcher_pcre_set_nv_prefix ( LogMatcher *  s,
const gchar *  prefix 
)

◆ log_matcher_ref()

LogMatcher* log_matcher_ref ( LogMatcher *  s)

◆ log_matcher_string_new()

LogMatcher* log_matcher_string_new ( const LogMatcherOptions options)

◆ log_matcher_unref()

void log_matcher_unref ( LogMatcher *  s)

Variable Documentation

◆ construct

◆ log_matcher_flag_handlers

CfgFlagHandler log_matcher_flag_handlers[]
Initial value:
=
{
{ "global", CFH_SET, offsetof(LogMatcherOptions, flags), LMF_GLOBAL },
{ "icase", CFH_SET, offsetof(LogMatcherOptions, flags), LMF_ICASE },
{ "ignore-case", CFH_SET, offsetof(LogMatcherOptions, flags), LMF_ICASE },
{ "newline", CFH_SET, offsetof(LogMatcherOptions, flags), LMF_NEWLINE },
{ "unicode", CFH_SET, offsetof(LogMatcherOptions, flags), LMF_UTF8 },
{ "utf8", CFH_SET, offsetof(LogMatcherOptions, flags), LMF_UTF8 },
{ "store-matches", CFH_SET, offsetof(LogMatcherOptions, flags), LMF_STORE_MATCHES },
{ "substring", CFH_SET, offsetof(LogMatcherOptions, flags), LMF_SUBSTRING },
{ "prefix", CFH_SET, offsetof(LogMatcherOptions, flags), LMF_PREFIX },
{ "disable-jit", CFH_SET, offsetof(LogMatcherOptions, flags), LMF_DISABLE_JIT },
{ "dupnames", CFH_SET, offsetof(LogMatcherOptions, flags), LMF_DUPNAMES },
{ NULL },
}
@ CFH_SET
Definition: cfg-parser.h:55
@ LMF_GLOBAL
Definition: logmatcher.h:38
@ LMF_UTF8
Definition: logmatcher.h:44
@ LMF_STORE_MATCHES
Definition: logmatcher.h:45
@ LMF_SUBSTRING
Definition: logmatcher.h:49
@ LMF_DUPNAMES
Definition: logmatcher.h:53
@ LMF_PREFIX
Definition: logmatcher.h:50
@ LMF_DISABLE_JIT
Definition: logmatcher.h:46
@ LMF_ICASE
Definition: logmatcher.h:39
@ LMF_NEWLINE
Definition: logmatcher.h:43
Definition: logmatcher.h:57

◆ 

struct { ... } matcher_types[]
Initial value:
=
{
{ "string", log_matcher_string_new },
{ "glob", log_matcher_glob_new },
{ NULL, NULL },
}
LogMatcher * log_matcher_pcre_re_new(const LogMatcherOptions *options)
Definition: logmatcher.c:699
LogMatcher * log_matcher_glob_new(const LogMatcherOptions *options)
Definition: logmatcher.c:266
LogMatcher * log_matcher_string_new(const LogMatcherOptions *options)
Definition: logmatcher.c:197

◆ name

const gchar* name