public ILogConstructor GetLogConstructor() { string messageFormat = options["LogMessageFormat"]; if (messageFormat == "basic" || messageFormat.Length < 5) { return(new BasicLogConstructor()); } constructor = new ConfigurableLogConstructor(); buffer.Clear(); for (int n = 0; n < messageFormat.Length; n++) { if (n < messageFormat.Length - 1 && messageFormat[n] == '\\') { Escaped(messageFormat[n + 1]); n++; } else { buffer.Append(messageFormat[n]); } } AddStringAppender(); constructor.Finished(); return(constructor); }
public ILogConstructor GetLogConstructor() { string messageFormat = options["LogMessageFormat"]; if (messageFormat == "basic" || messageFormat.Length < 5) return new BasicLogConstructor(); constructor = new ConfigurableLogConstructor(); buffer.Clear(); for (int n = 0; n < messageFormat.Length; n++) { if (n < messageFormat.Length - 1 && messageFormat[n] == '\\') { Escaped(messageFormat[n + 1]); n++; } else { buffer.Append(messageFormat[n]); } } AddStringAppender(); constructor.Finished(); return constructor; }