Пример #1
0
        protected override void Write(LogEventInfo logEvent)
        {
            if (logger == null)
            {
                logger = CreateLogger();
                logger.Run();
            }

            var message = ToMessage(logEvent);
            logger.Send(message);
        }
Пример #2
0
        protected override void Append(LoggingEvent loggingEvent)
        {
            if (logger == null)
            {
                logger = CreateLogger();
                logger.Run();
            }

            var renderedEvent = RenderLoggingEvent(loggingEvent);
            logger.Send(renderedEvent);
        }