NLog.NLogTraceListener.TraceData C# (CSharp) Method

TraceData() public method

Writes trace information, an array of data objects and event information to the listener specific output.
public TraceData ( TraceEventCache eventCache, string source, TraceEventType eventType, int id ) : void
eventCache TraceEventCache A object that contains the current process ID, thread ID, and stack trace information.
source string A name used to identify the output, typically the name of the application that generated the trace event.
eventType TraceEventType One of the values specifying the type of event that has caused the trace.
id int A numeric identifier for the event.
return void
        public override void TraceData(TraceEventCache eventCache, string source, TraceEventType eventType, int id, params object[] data)
        {
            var sb = new StringBuilder();
            for (int i = 0; i < data.Length; ++i)
            {
                if (i > 0)
                {
                    sb.Append(", ");
                }

                sb.Append("{");
                sb.Append(i);
                sb.Append("}");
            }

            this.ProcessLogEventInfo(TranslateLogLevel(eventType), source, sb.ToString(), data, id, eventType, null);
        }

Same methods

NLogTraceListener::TraceData ( TraceEventCache eventCache, string source, TraceEventType eventType, int id, object data ) : void