Example #1
0
 private static void WriteEvent(TraceEventType eventType, CompositionTraceId traceId, string format, params object[] arguments)
 {
     if (true /* !Debugger.IsLogging() */)
     {
         return;
     }
     //            string logMessage = CreateLogMessage(eventType, traceId, format, arguments);
     /*Debugger.Log(0, null, logMessage);*/
 }
Example #2
0
 private static void WriteEvent(TraceEventType eventType, CompositionTraceId traceId, string format, params object[] arguments)
 {
     if (true /* !Debugger.IsLogging() */)
     {
         return;
     }
     //            string logMessage = CreateLogMessage(eventType, traceId, format, arguments);
     /*Debugger.Log(0, null, logMessage);*/
 }
 private static void WriteEvent(TraceEventType eventType, CompositionTraceId traceId, string format, params object[] arguments)
 {
     const string LEVEL = "Level = ";
     const string ID = " ,Id = ";
     const string NEW_LINE = "\r\n";
     StringBuilder sb = new StringBuilder (60);
     sb.Append (LEVEL);
     sb.Append (eventType);
     sb.Append (ID);
     sb.Append (traceId);
     sb.Append (NEW_LINE);
     sb.AppendFormat (format, arguments);
     var mssage = eventType.ToString() + string.Format(format, arguments);
 }
Example #4
0
        private static void WriteEvent(TraceEventType eventType, CompositionTraceId traceId, string format, params object[] arguments)
        {
            const string  LEVEL    = "Level = ";
            const string  ID       = " ,Id = ";
            const string  NEW_LINE = "\r\n";
            StringBuilder sb       = new StringBuilder(60);

            sb.Append(LEVEL);
            sb.Append(eventType);
            sb.Append(ID);
            sb.Append(traceId);
            sb.Append(NEW_LINE);
            sb.AppendFormat(format, arguments);
            var mssage = eventType.ToString() + string.Format(format, arguments);
        }
Example #5
0
        private static string CreateLogMessage(TraceEventType eventType, CompositionTraceId traceId, string format, params object[] arguments)
        {
            StringBuilder messageBuilder = new StringBuilder();

            // Format taken from TraceListener.TraceEvent in .NET Framework
            messageBuilder.Append($"{s_sourceName} {eventType}: {(int)traceId} : ");

            if (arguments == null)
            {
                messageBuilder.Append(format);
            }
            else
            {
                messageBuilder.AppendFormat(CultureInfo.InvariantCulture, format, arguments);
            }

            messageBuilder.AppendLine();

            return(messageBuilder.ToString());
        }
        internal static string CreateLogMessage(TraceEventType eventType, CompositionTraceId traceId, string format, params object[] arguments)
        {
            StringBuilder messageBuilder = new StringBuilder();

            // Format taken from TraceListener.TraceEvent in full framework
            messageBuilder.AppendFormat(CultureInfo.InvariantCulture, "{0} {1}: {2} : ",
                                        SourceName, eventType.ToString(), (int)traceId);

            if (arguments == null)
            {
                messageBuilder.Append(format);
            }
            else
            {
                messageBuilder.AppendFormat(CultureInfo.InvariantCulture, format, arguments);
            }

            messageBuilder.AppendLine();

            return(messageBuilder.ToString());
        }
Example #7
0
        internal static string CreateLogMessage(TraceEventType eventType, CompositionTraceId traceId, string format, params object[] arguments)
        {
            StringBuilder messageBuilder = new StringBuilder();

            // Format taken from TraceListener.TraceEvent in full framework
            messageBuilder.AppendFormat(CultureInfo.InvariantCulture, "{0} {1}: {2} : ",
                s_sourceName, eventType.ToString(), (int)traceId);

            if (arguments == null)
            {
                messageBuilder.Append(format);
            }
            else
            {
                messageBuilder.AppendFormat(CultureInfo.InvariantCulture, format, arguments);
            }

            messageBuilder.AppendLine();

            return messageBuilder.ToString();
        }
 public override void WriteError(CompositionTraceId traceId, string format, params object[] arguments)
 {
     WriteEvent(TraceEventType.Error, traceId, format, arguments);
 }
Example #9
0
 public abstract void WriteError(CompositionTraceId traceId, string format, params object[] arguments);
        public static void WriteError(CompositionTraceId traceId, string format, params object[] arguments)
        {
            EnsureEnabled(CanWriteError);

            Source.WriteError(traceId, format, arguments);
        }
Example #11
0
 public override void WriteError(CompositionTraceId traceId, string format, params object[] arguments)
 {
     WriteEvent(TraceEventType.Error, traceId, format, arguments);
 }
Example #12
0
 private static void WriteEvent(TraceEventType eventType, CompositionTraceId traceId, string format, params object[] arguments)
 {
     Source.TraceEvent(eventType, (int)traceId, format, arguments);
 }
Example #13
0
        public static void WriteWarning(CompositionTraceId traceId, string format, params object[] arguments)
        {
            EnsureEnabled(CanWriteWarning);

            s_source.WriteWarning(traceId, format, arguments);
        }
Example #14
0
 public abstract void WriteError(CompositionTraceId traceId, string format, params object[] arguments);
 private static void WriteEvent(TraceEventType eventType, CompositionTraceId traceId, string format, params object[] arguments)
 {
     Source.TraceEvent(eventType, (int)traceId, format, arguments);
 }
        public static void WriteError(CompositionTraceId traceId, string format, params object[] arguments)
        {
            EnsureEnabled(CanWriteError);

            Source.WriteError(traceId, format, arguments);
        }