Example #1
0
 private static void Tracer_OnLeave(InvokeWrapperBase sender, object result, string funcFootprint, TimeSpan? runTime)
 {
     if (runTime.Value.TotalSeconds > 5)
     {
         Tracer_OnLog(LogLevels.Warning, ((Tracing.Tracer)sender).Category, "Too slow, 'failed!");
         return;
     }
     Tracer_OnLog(LogLevels.Information, ((Tracing.Tracer)sender).Category, string.Format("Passed calling {0}.", funcFootprint));
 }
Example #2
0
        private static void Tracer_OnException(InvokeWrapperBase sender, Exception exc, string functionInfo)
        {
            var msg = string.Format("{0}, details: {1}", functionInfo, exc.ToString());
            Tracer_OnLog(LogLevels.Fatal, null, msg);

            // you can rethrow exc if needed.
            //throw exc;
        }