Example #1
0
        internal static void LogData(AppenderSkeleton appender, string message, Level trace)
        {
            LoggingEventData eventData = new LoggingEventData()
            {
                Level   = trace,
                Message = message
            };

            appender.DoAppend(new LoggingEvent(eventData));
        }
Example #2
0
 /// <summary>
 /// Push logs entities to the primary appender.
 /// </summary>
 /// <param name="loggingEvent"></param>
 protected override void Append(LoggingEvent loggingEvent)
 {
     if (LogToFailOverAppender)
     {
         _failOverAppender?.DoAppend(loggingEvent);
     }
     else
     {
         try
         {
             _primaryAppender?.DoAppend(loggingEvent);
         }
         catch
         {
             ActivateFailOverMode();
             Append(loggingEvent);
             DeActivateFailOverMode();
         }
     }
 }