public string Format(ILog log, BootFX.Common.Management.LogLevel level, LogArgs args) { // mbr - 22-05-2008 - changed this to add date/time, because that's always handy. // // mbr - 20-08-2006 - wasn't handling exceptions... // if(ex == null) // return buf; // else // return string.Format("{0}\r\n\t{1}", buf, ex); // builder... StringBuilder builder = new StringBuilder(); DefaultLogFormatter.AppendDateTime(builder); builder.Append(" | "); builder.Append(args.Message); // ex? if (args.HasException) { builder.Append("\r\n\t"); builder.Append(args.Exception); } // return... return(builder.ToString()); }
public string Format(ILog log, BootFX.Common.Management.LogLevel level, LogArgs args) { StringBuilder builder = new StringBuilder(); DefaultLogFormatter.AppendDateTime(builder); builder.Append(" | "); DefaultLogFormatter.AppendLevelName(builder, level); builder.Append(" | "); DefaultLogFormatter.AppendThreadName(builder); builder.Append(" | "); builder.Append(args.Message); // ex? if (args.HasException) { builder.Append("\r\n\t"); builder.Append(args.Exception); } // return... return(builder.ToString()); }