public BetterLog(string path, BetterLogSettings settings) { LogSettings = settings; streamWriter = new StreamWriter(path) { AutoFlush = true }; formatter = new BetterLogFormatter(settings.Formatter); }
public void OnLogMessage(string logName, LogLevel level, object message, Object context, Exception exception, IStackTrace location) { var formatted = BetterLogFormatter.GetFormattedLogLine(level, message, exception); writer.WriteLine(formatted); }