예제 #1
0
        private static string FormatExceptionMessage(Exception exception, string fmt, object[] vars)
        {
            // Simple exception formatting: for a more comprehensive version see
            // http://code.msdn.microsoft.com/windowsazure/Fix-It-app-for-Building-cdd80df4
            var msg      = string.Format(fmt, vars);
            var msgfinal = string.Format(";Exception Details={0}", FormatUtils.FormatException(exception, includeContext: true));

            return(msg + msgfinal);
        }
예제 #2
0
        public void TraceApi(string componentName, string method, TimeSpan timespan, string properties)
        {
            var msg = FormatUtils.FormatTraceApi(componentName, method, timespan, properties);

            Trace.TraceInformation(msg);
        }
예제 #3
0
 public void Error(Exception exception, string fmt, params object[] vars)
 {
     Trace.TraceError(FormatUtils.FormatExceptionStackTrace(exception), fmt, vars);
 }
예제 #4
0
 public void Error(Exception exception)
 {
     Trace.TraceError(FormatUtils.FormatExceptionStackTrace(exception));
 }