示例#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));
 }