ITraceWriter is designed to not incur a performance cost for categories and levels where tracing is disabled. Specifically, traceAction should only be called if tracing is enabled. Accordingly, NlogTraceWriter.Trace should first check whether NLog is tracing at a given level, and only call traceAction if it is. This would provide a major performance improvement.
ITraceWriteris designed to not incur a performance cost for categories and levels where tracing is disabled. Specifically,traceActionshould only be called if tracing is enabled. Accordingly,NlogTraceWriter.Traceshould first check whether NLog is tracing at a given level, and only calltraceActionif it is. This would provide a major performance improvement.