public RegexRecordParser(string pattern,
                          string timeStampFormat,
                          ILogger logger,
                          string extractionPattern,
                          string extractionRegexOptions,
                          DateTimeKind timeZoneKind,
                          RegexRecordParserOptions parserOptions) :
     this(pattern,
          timeStampFormat,
          logger,
          extractionPattern,
          extractionRegexOptions,
          timeZoneKind,
          parserOptions,
          null)
 {
 }
Example #2
0
 public RegexRecordParser(string pattern,
                          string timeStampFormat,
                          ILogger logger,
                          string extractionPattern,
                          DateTimeKind timeZoneKind,
                          RegexRecordParserOptions parserOptions)
 {
     _regex = new Regex(pattern);
     if (!string.IsNullOrEmpty(extractionPattern))
     {
         _extractionRegex = new Regex(extractionPattern);
     }
     _timeStampFormat = timeStampFormat;
     _logger          = logger;
     _timeZoneKind    = timeZoneKind;
     _parserOptions   = parserOptions;
 }
 public TimeStampRecordParser(string timeStamp, ILogger logger, DateTimeKind timeZoneKind, RegexRecordParserOptions parserOptions) :
     base(ConvertTimeStampToRegex(timeStamp), timeStamp, logger, null, timeZoneKind, parserOptions)
 {
     _timeStamp = timeStamp; //e.g.: "MM/dd/yyyy HH:mm:ss"
 }
 public SysLogParser(ILogger logger, DateTimeKind timeZoneKind, RegexRecordParserOptions parserOptions) :
     base(TIMESTAMP_PATTERN, TIMESTAMP_FORMAT, logger, EXTRACTION_PATTERN, null, timeZoneKind, parserOptions, ALTERNATE_TIMESTAMP_FORMAT)
 {
 }