Exemplo n.º 1
0
 public void Error(string message, RabbitMqExceptionDetail ex)
 {
     if (IsEnabled())
     {
         this.WriteEvent(3, message, ex);
     }
 }
Exemplo n.º 2
0
 protected override void OnEventWritten(EventWrittenEventArgs eventData)
 {
     foreach (object pl in eventData.Payload)
     {
         if (pl is IDictionary <string, object> dict)
         {
             var rex = new RabbitMqExceptionDetail(dict);
             Console.WriteLine("{0}: {1}", eventData.Level, rex.ToString());
         }
         else
         {
             Console.WriteLine("{0}: {1}", eventData.Level, pl.ToString());
         }
     }
 }
 protected override void OnEventWritten(EventWrittenEventArgs eventData)
 {
     foreach(var pl in eventData.Payload)
     {
         var dict = pl as IDictionary<string, object>;
         if(dict != null)
         {
             var rex = new RabbitMqExceptionDetail(dict);
             Console.WriteLine("{0}: {1}", eventData.Level, rex.ToString());
         }
         else
         {
             Console.WriteLine("{0}: {1}", eventData.Level, pl.ToString());
         }
     }
 }
 public void Error(string message,  RabbitMqExceptionDetail ex)
 {
     if(IsEnabled())
         this.WriteEvent(3, message, ex);
 }