private void Diagnostics_MessageLogged(Diagnostics.LogMessage message) { if (this.outputDepugFileStreamWriter == null) { return; } Diagnostics.LogFormat diagnosticsLogFormat = this.DiagnosticsLogFormat; if (diagnosticsLogFormat != Diagnostics.LogFormat.Html) { if (diagnosticsLogFormat == Diagnostics.LogFormat.Text) { Diagnostics.LogType logType = (Diagnostics.LogType)((long)message.Flags & (long)((ulong)-16777216)); Diagnostics.LogType logType2 = logType; if (logType2 != Diagnostics.LogType.Message) { if (logType2 == Diagnostics.LogType.Warning) { this.outputDepugFileStreamWriter.Write("[W] "); goto IL_140; } if (logType2 == Diagnostics.LogType.Error) { this.outputDepugFileStreamWriter.Write("[E] "); goto IL_140; } } this.outputDepugFileStreamWriter.Write(" "); IL_140: this.outputDepugFileStreamWriter.Write(DateTime.Now.ToString("HH:mm:ss:fff")); this.outputDepugFileStreamWriter.Write(" "); this.outputDepugFileStreamWriter.WriteLine(message.Message); this.Diagnostics_OutputDebugStackTrace(message); this.outputDepugFileStreamWriter.WriteLine(); } } else { Diagnostics.LogType logType3 = (Diagnostics.LogType)((long)message.Flags & (long)((ulong)-16777216)); this.outputDepugFileStreamWriter.WriteLine("<p class=\"{1}\"><span class=\"time\">{2}</span><a onclick=\"hide('trace{0}')\">STACK</a>{3}</p>", new object[] { this.DiagnosticsLogCounter, logType3.ToString(), DateTime.Now.ToString("HH:mm:ss:fff"), message.Message }); this.outputDepugFileStreamWriter.WriteLine("<pre id=\"trace{0}\">", this.DiagnosticsLogCounter); this.Diagnostics_OutputDebugStackTrace(message); this.DiagnosticsLogCounter++; this.outputDepugFileStreamWriter.WriteLine("</pre>"); } this.outputDepugFileStreamWriter.Flush(); }
private void Diagnostics_AssertionFailed(Diagnostics.LogMessage message) { if (this.outputDepugFileStreamWriter == null) { return; } Diagnostics.LogFormat diagnosticsLogFormat = this.DiagnosticsLogFormat; if (diagnosticsLogFormat != Diagnostics.LogFormat.Html) { if (diagnosticsLogFormat == Diagnostics.LogFormat.Text) { this.outputDepugFileStreamWriter.Write("[A] "); this.outputDepugFileStreamWriter.Write(DateTime.Now.ToString("HH:mm:ss:fff")); this.outputDepugFileStreamWriter.Write(" "); this.outputDepugFileStreamWriter.WriteLine(message.Message); this.Diagnostics_OutputDebugStackTrace(message); this.outputDepugFileStreamWriter.WriteLine(); } } else { Diagnostics.LogType logType = Diagnostics.LogType.Assertion; this.outputDepugFileStreamWriter.WriteLine("<p class=\"{1}\"><span class=\"time\">{2}</span><a onclick=\"hide('trace{0}')\">STACK</a>{3}</p>", new object[] { this.DiagnosticsLogCounter, logType.ToString(), DateTime.Now.ToString("HH:mm:ss:fff"), "Assertion Failed: " + message.Message }); this.outputDepugFileStreamWriter.WriteLine("<pre id=\"trace{0}\">", this.DiagnosticsLogCounter); this.Diagnostics_OutputDebugStackTrace(message); int diagnosticsLogCounter = this.DiagnosticsLogCounter; this.DiagnosticsLogCounter = diagnosticsLogCounter + 1; this.outputDepugFileStreamWriter.WriteLine("</pre>"); } this.outputDepugFileStreamWriter.Flush(); }