Exemple #1
0
 public SerilogFileFormat(string name, string format, Encoding encoding)
 {
     _name     = name;
     _format   = format;
     _encoding = encoding;
     _parser   = new SerilogEntryParser(format);
 }
        private static bool TryParseFormat(StreamReader reader,
                                           SerilogEntryParser parser)
        {
            // we're happy if we can match the first line
            var line = reader.ReadLine();

            if (!parser.TryParse(0, line, out _))
            {
                return(false);
            }

            return(true);
        }