You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
... as a result, these messages cannot be filtered. I suggest changing this:
`
public void Emit(LogEvent logEvent)
{
if (logEvent == null) throw new ArgumentNullException(nameof(logEvent));
var sr = new StringWriter();
_textFormatter.Format(logEvent, sr);
var text = sr.ToString().Trim();
if (logEvent.Level == LogEventLevel.Error || logEvent.Level == LogEventLevel.Fatal)
Trace.TraceError(text);
else if (logEvent.Level == LogEventLevel.Warning)
Trace.TraceWarning(text);
else if (logEvent.Level == LogEventLevel.Information)
Trace.TraceInformation(text);
else
Trace.WriteLine(text);
}
`
to this:
`
public void Emit(LogEvent logEvent)
{
if (logEvent == null) throw new ArgumentNullException(nameof(logEvent));
var sr = new StringWriter();
_textFormatter.Format(logEvent, sr);
var text = sr.ToString().Trim();
if (logEvent.Level == LogEventLevel.Error || logEvent.Level == LogEventLevel.Fatal)
Trace.TraceError(text);
else if (logEvent.Level == LogEventLevel.Warning)
Trace.TraceWarning(text);
else
Trace.TraceInformation(text);
}
`
A better granularity could be had if Trace had exposed the TraceEvent method, of the TraceInternal class.
The text was updated successfully, but these errors were encountered:
... as a result, these messages cannot be filtered. I suggest changing this:
`
`
to this:
`
`
A better granularity could be had if
Trace
had exposed theTraceEvent
method, of theTraceInternal
class.The text was updated successfully, but these errors were encountered: