public string[] BuildLogEntries(LogEventInfo logEvent, Layout layout) { if (logEvent.Level == LogLevel.Off) { return(new string[0]); } var originalLogEntry = layout.Render(logEvent); return(splitOnNewLinePolicy.IsApplicable() ? splitOnNewLinePolicy.Apply(originalLogEntry) : new[] { originalLogEntry }); }
public string[] BuildLogEntries(LogEventInfo logEvent, Layout layout) { if (logEvent.Level == LogLevel.Off) { return(NoEntries); } var originalLogEntry = layout.Render(logEvent); if (splitOnNewLinePolicy.IsApplicable() && splitOnNewLinePolicy.CausesSplitOf(originalLogEntry)) { return(splitOnNewLinePolicy.Apply(originalLogEntry)); } if (singleEntry == null) { singleEntry = new string[1]; } singleEntry[0] = originalLogEntry; return(singleEntry); }
public string[] BuildLogEntries(LogEventInfo logEvent, Layout layout) { var originalLogEntry = layout.Render(logEvent); return(splitOnNewLinePolicy.IsApplicable() ? splitOnNewLinePolicy.Apply(originalLogEntry) : new[] { originalLogEntry }); }