Skip to content

TraceInfoStruct

TraceInfoStruct is a Serializable value type used to pass method-level trace context data between clsLogTrace, the (never-reached) local CSV file sink, and the (never-reached) remote wsLogging SOAP web service.

Purpose

  • Carry ambient context (application name, machine name, environment, page name, username) and method-tracing detail (AssemblyName, ClassName, MethodName, MethodPosition, TraceID, DataText) for a single trace record.
  • Provide a CSV serialization format (CSVHeader/ToCSVString) mirroring the pattern used by AuditInfoStruct and ErrorInfoStruct, even though clsLogTrace's write path never dispatches a populated instance to any sink (see BR-002).

Context

  • Namespace: SAIF.Framework.Logging
  • Assembly/package: SAIF.BOF.Framework.Logging (SAIF.Framework.Logging/SAIF.BOF.Framework.Logging.vbproj)
  • Declared <Serializable()> Public Structure TraceInfoStruct, allowing it to be marshalled to the wsLogging SOAP web service.

Public members

Member Signature Purpose
ApplicationName Public ApplicationName As String Name of the hosting application that produced the trace event.
AssemblyName Public AssemblyName As String Name of the assembly containing the traced method.
ClassName Public ClassName As String Name of the class containing the traced method.
DataText Public DataText As String Caller-supplied data payload rendered to text, for custom trace messages.
Environment Public Environment As String Deployment environment name derived for the hosting application.
MachineName Public MachineName As String Name of the machine on which the trace event occurred.
MethodName Public MethodName As String Name of the traced method.
MethodPosition Public MethodPosition As String Indicates the traced method's begin/end/message position.
PageName Public PageName As String Name of the page (web) or calling context associated with the event.
TraceDate Public TraceDate As DateTime Timestamp of the trace event.
TraceID Public TraceID As String Identifier correlating related trace events (e.g., a single method call's begin/end pair)*.
UserName Public UserName As String Name of the current user associated with the event.
CSVHeader Public Shared Function CSVHeader() As String Returns the fixed CSV column-header row mirroring the file-sink format used by AuditInfoStruct/ErrorInfoStruct.
ToCSVString Public Function ToCSVString() As String Renders the struct's field values as a single CSV row.

Behavioral notes

  • Built by clsLogTrace's gated trace methods (MethodBegin/MethodEnd/MethodMessage), including reflection-derived calling-method info via clsLogCommon.GetCallingMethodInfo, but the populated struct is never written to any sink because clsLogTrace's private WriteMessage is a no-op (see BR-002).

Constraints and usage notes

  • Although this struct's shape mirrors AuditInfoStruct/ErrorInfoStruct and could in principle be marshalled to wsLogging.clsWSLogging.WriteTrace, no code path in this library currently dispatches a populated TraceInfoStruct to any sink.

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • SAIF.Framework.Logging/TraceInfoStruct.vb