コード例 #1
0
 public static void LogTo(DataHeader header, string fileName, params object[] values)
 {
     try
     {
         var filter = LogFilter;                 // Capture
         var mask   = TopicMask;                 // Capture
         if
         (
             (filter == null || filter(header, values)) &&
             (mask == null || mask.IsMatch(header.Topic))
         )
         {
             var handler = LogData;                      // Capture
             if (handler != null)
             {
                 handler(header, fileName, values);
             }
         }
     }
     catch (Exception e)
     {
         System.Diagnostics.Debug.WriteLine("Error attempting to log data: \r\n" + e.ToString());
         // Don't rethrow
     }
 }
コード例 #2
0
 public static void Log(DataHeader header, params object[] values)
 {
     LogTo(header, null, values);
 }