예제 #1
0
void
log_matcher_options_init(LogMatcherOptions *options, GlobalConfig *cfg)
{
  if (!options->type)
    {
      const gchar *default_matcher = "pcre";

      if (cfg_is_config_version_older(cfg, 0x0306))
        {
          default_matcher = "posix";
        }
      if (!log_matcher_options_set_type(options, default_matcher))
        g_assert_not_reached();
    }
}
예제 #2
0
void
log_matcher_options_init(LogMatcherOptions *options, GlobalConfig *cfg)
{
  if (!options->type)
    {
      const gchar *default_matcher = "pcre";

      if (cfg_is_config_version_older(cfg, 0x0306))
        {
          msg_warning_once("WARNING: syslog-ng changed the default regexp implementation to PCRE starting from " VERSION_3_6 ", please ensure your regexp works with PCRE or please specify type(\"posix\") in filters explicitly",
                           NULL);
          default_matcher = "posix";
        }
      if (!log_matcher_options_set_type(options, default_matcher))
        g_assert_not_reached();
    }
}