Beispiel #1
0
        internal static void TraceFrameEvent(TraceFrameEventType eventType, TraceFrame traceFrame)
        {
            string traceFrameString = TraceFrame.GetTraceFrameString();
            string fullMessage      = string.Concat(traceFrameString, " ", traceFrame.Message, " ", eventType.ToString());

            MethodBase caller = traceFrame.Caller;

            TraceHelper.TraceInformationPrivate(fullMessage, caller);
        }
Beispiel #2
0
        private static string GetFormattedMessage(string message, string methodSignature)
        {
            string traceFrameString      = TraceFrame.GetTraceFrameString();
            string dateTimeString        = DateTime.UtcNow.ToString("yyyy-MM-dd HH:mm:ss");
            string managedThreadIdString = System.Threading.Thread.CurrentThread.ManagedThreadId.ToString(CultureInfo.InvariantCulture);
            string formattedMessage      = string.Format(CultureInfo.InvariantCulture, "[{0}] '{1}' [{2}] [{3}] [{4}]", traceFrameString, message, methodSignature, dateTimeString, managedThreadIdString);

            return(formattedMessage);
        }