Пример #1
0
 void ILogHnd.OnError(string userId, ILogInfo info)
 {
     try
     {
         string msg = string.Format("user= {0}: {1} / {2}", userId, info.MessageCodeToString(), info.Message);
         Log("Err", msg);
     }
     catch (Exception ex)
     {
         SelfDeregisterILogHnd();
     }
 }
Пример #2
0
 void ILogHnd.OnError(string userId, ILogInfo info)
 {
     try
     {
         string descr = string.Format("Err: user= {0}: {1} / {2}", userId, info.MessageCodeToString(), info.Message);
         Debug.Fail("SysteEventLogHnd: " + descr);
         log.WriteEntry(descr, System.Diagnostics.EventLogEntryType.Error);
     }
     catch (Exception ex)
     {
         SelfDeregisterILogHnd();
     }
 }
Пример #3
0
 void ILogHnd.OnStatus(string userId, ILogInfo info)
 {
     try
     {
         Console.WriteLine("Sta {0,4:D4}, user= {1}: {2} / {3}", msgCounter, userId, info.MessageCodeToString(), info.Message);
         msgCounter++;
     }
     catch (Exception ex)
     {
         SelfDeregisterILogHnd();
     }
 }
Пример #4
0
 void ILogHnd.OnStatus(string userId, ILogInfo info)
 {
     try
     {
         if (StatusInEventLogSchreiben)
         {
             string descr = string.Format("Sta: user= {0}: {1} / {2}", userId, info.MessageCodeToString(), info.Message);
             Debug.WriteLine("SysteEventLogHnd: " + descr);
             log.WriteEntry(descr, System.Diagnostics.EventLogEntryType.Information);
         }
     }
     catch (Exception ex)
     {
         SelfDeregisterILogHnd();
     }
 }