예제 #1
0
        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 });
        }
예제 #2
0
        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);
        }
예제 #3
0
        public string[] BuildLogEntries(LogEventInfo logEvent, Layout layout)
        {
            var originalLogEntry = layout.Render(logEvent);

            return(splitOnNewLinePolicy.IsApplicable() ? splitOnNewLinePolicy.Apply(originalLogEntry) : new[] { originalLogEntry });
        }