示例#1
0
 public static string FormatError(ErrorLogEvent e, string dateFormat)
 {
     return(e.Cause == null
                         ? FormatMessage(e, _ErrorFormat, dateFormat)
                         : FormatMessage(e, _ErrorFormatException, dateFormat, e.Cause));
 }
示例#2
0
        public static void PrintError(ErrorLogEvent e, string dateFormat = DefaultDateFormat)
        {
            var msg = LineLogFormatter.FormatError(e, dateFormat);

            WriteLine(msg, LogLevel.Error);
        }