LogMatcher * log_matcher_string_new(GlobalConfig *cfg, const LogMatcherOptions *options) { LogMatcherString *self = g_new0(LogMatcherString, 1); log_matcher_init(&self->super, options); self->super.compile = log_matcher_string_compile; self->super.match = log_matcher_string_match; self->super.replace = log_matcher_string_replace; return &self->super; }
LogMatcher * log_matcher_glob_new(const LogMatcherOptions *options) { LogMatcherGlob *self = g_new0(LogMatcherGlob, 1); log_matcher_init(&self->super, options); self->super.compile = log_matcher_glob_compile; self->super.match = log_matcher_glob_match; self->super.replace = NULL; self->super.free_fn = log_matcher_glob_free; return &self->super; }
LogMatcher * log_matcher_string_new(const LogMatcherOptions *options) { LogMatcherString *self = g_new0(LogMatcherString, 1); log_matcher_init(&self->super, options); self->super.compile = log_matcher_string_compile; self->super.match = log_matcher_string_match; self->super.replace = log_matcher_string_replace; self->super.free_fn = log_matcher_string_free; return &self->super; }
LogMatcher * log_matcher_pcre_re_new(GlobalConfig *cfg, const LogMatcherOptions *options) { LogMatcherPcreRe *self = g_new0(LogMatcherPcreRe, 1); log_matcher_init(&self->super, options); self->super.compile = log_matcher_pcre_re_compile; self->super.match = log_matcher_pcre_re_match; self->super.replace = log_matcher_pcre_re_replace; self->super.free_fn = log_matcher_pcre_re_free; return &self->super; }
LogMatcher * log_matcher_posix_re_new(const LogMatcherOptions *options) { LogMatcherPosixRe *self = g_new0(LogMatcherPosixRe, 1); log_matcher_init(&self->super, options); self->super.compile = log_matcher_posix_re_compile; self->super.match = log_matcher_posix_re_match; self->super.replace = log_matcher_posix_re_replace; self->super.free_fn = log_matcher_posix_re_free; if (configuration && cfg_is_config_version_older(configuration, 0x0300)) { msg_warning_once("WARNING: filters do not store matches in macros by default from " VERSION_3_0 ", please update your configuration by using an explicit 'store-matches' flag to achieve that", NULL); self->super.flags = LMF_STORE_MATCHES; } return &self->super; }