internal static void Trace(TraceType traceType, string msg) { switch (traceType) { case TraceType.DebugTrace: ExTraceGlobals.DDITracer.TraceDebug(0, 0L, msg); break; case TraceType.WarningTrace: ExTraceGlobals.DDITracer.TraceWarning(0, 0L, msg); break; case TraceType.ErrorTrace: ExTraceGlobals.DDITracer.TraceError(0, 0L, msg); break; case TraceType.InfoTrace: ExTraceGlobals.DDITracer.TraceInformation(0, 0L, msg); break; case TraceType.PerformanceTrace: ExTraceGlobals.DDITracer.TracePerformance(0, 0L, msg); break; case TraceType.FunctionTrace: ExTraceGlobals.DDITracer.TraceFunction(0, 0L, msg); break; case TraceType.PfdTrace: ExTraceGlobals.DDITracer.TracePfd(0, 0L, msg); break; } if (DDIHelper.IsWebTraceEnabled() && HttpContext.Current.ApplicationInstance != null) { HttpContext.Current.Trace.Write(msg); } }
private static bool HasTraceEnabled(TraceType traceType) { return(ExTraceGlobals.DDITracer.IsTraceEnabled(traceType) || DDIHelper.IsWebTraceEnabled()); }