コード例 #1
0
        public void Write(ClientLogEntry entry)
        {
            switch (entry.Severity)
            {
            case TraceEventType.Critical:
            case TraceEventType.Error:
                SnLog.WriteError(entry.Message, entry.EventId, entry.Categories, entry.Priority, entry.Title, entry.Properties);
                break;

            case TraceEventType.Warning:
                SnLog.WriteWarning(entry.Message, entry.EventId, entry.Categories, entry.Priority, entry.Title, entry.Properties);
                break;

            case TraceEventType.Verbose:
                // do nothing: verbose log should be written using SnTrace
                break;

            case TraceEventType.Information:
                SnLog.WriteInformation(entry.Message, entry.EventId, entry.Categories, entry.Priority, entry.Title, entry.Properties);
                break;

            default:
                SnLog.WriteInformation(entry.Severity + ": " + entry.Message, entry.EventId, entry.Categories, entry.Priority, entry.Title, entry.Properties);
                break;
            }
        }
コード例 #2
0
ファイル: LogService.cs プロジェクト: maxpavlov/FlexNet
 public void Write(ClientLogEntry entry)
 {
     Logger.Write(entry.Message, entry.Categories, entry.Priority, entry.EventId, entry.Severity, entry.Title, entry.Properties);
 }
コード例 #3
0
ファイル: LogService.cs プロジェクト: pchaozhong/FlexNet
 public void Write(ClientLogEntry entry)
 {
     Logger.Write(entry.Message, entry.Categories, entry.Priority, entry.EventId, entry.Severity, entry.Title, entry.Properties);
 }