예제 #1
0
        public string Format(SchemaFileLogEntry entry)
        {
            var transformedEntry = new
            {
                time    = DateTime.Now,
                level   = entry.Level,
                type    = entry.Type,
                message = entry.Message,
                file    = entry.File,
            };

            return(JsonConvert.SerializeObject(transformedEntry, Formatting.None, new StringEnumConverter()));
        }
예제 #2
0
 public string Format(SchemaFileLogEntry entry)
 {
     return($"[{entry.Level}][{entry.Type}]: {entry.Message} ({entry.File})");
 }