clsLogTrace¶
clsLogTrace is the method-level trace logging entry point. It is fully obsolete and functionally disabled: its public methods can still be called, but no trace data is ever written to any sink.
Purpose¶
- Historically provided method-begin/end/message trace logging; now retained only for backward source compatibility (see BR-002).
Context¶
- Namespace:
SAIF.Framework.Logging - Assembly/package:
SAIF.BOF.Framework.Logging(SAIF.Framework.Logging/SAIF.BOF.Framework.Logging.vbproj) - Class is
Serializablewith all Shared (static) members.
Public members¶
| Member | Signature | Purpose |
|---|---|---|
IsEnabled |
Shared Property IsEnabled As Boolean |
Shared flag gating whether trace calls attempt to build/dispatch a trace record. |
PageOutputEnabled |
Shared Property PageOutputEnabled As Boolean |
Historically controlled page-level trace output; no longer produces output since the sink is a no-op. |
TraceUser |
Shared Property TraceUser As String |
Configures the specific user allow-listed for trace gating via UserTraceEnabled. |
UserTraceEnabled |
Shared ReadOnly Property UserTraceEnabled As Boolean |
Returns True when the current user matches TraceUser, gating trace calls independent of IsEnabled. |
MethodBegin |
<Obsolete("Log Trace No Longer Supported, Please remove")> Shared Sub MethodBegin(...) |
Historically recorded a method-entry trace event; the write path is a no-op. |
MethodEnd |
<Obsolete("Log Trace No Longer Supported, Please remove")> Shared Sub MethodEnd(...) |
Historically recorded a method-exit trace event; the write path is a no-op. |
MethodMessage |
<Obsolete("Log Trace No Longer Supported, Please remove")> Shared Sub MethodMessage(...) |
Historically recorded an arbitrary trace message; the write path is a no-op. |
ToFile |
Shared Sub ToFile() |
Redirects the (inert) trace sink to a local CSV file (throws if IsWeb; see BR-003). |
ToFile |
Shared Sub ToFile(fileName As String) |
Same as ToFile(), using a caller-supplied file name. |
Behavioral notes¶
MethodBegin,MethodEnd, andMethodMessageare all decorated<Obsolete("Log Trace No Longer Supported, Please remove")>.- When gated on (
IsEnabled Or UserTraceEnabled), aTraceInfoStructis still built, including reflection-derived calling-method info (GetCallingMethodInfo), but the privateWriteMessagesink is a no-op ('Removed Logic as tracing should not be used.) — no data ever reaches the file or web-service sinks regardless of flag state. - The class still exposes a private
WSWriteMessagepath, but it is never reached becauseWriteMessagereturns before dispatching.
Constraints and usage notes¶
- Consumers should not rely on this class for any trace output; all public trace methods are obsolete and functionally inert.
ToFile()/ToFile(fileName)must not be called from a web application; doing so throwsApplicationException("Logging to files not valid for web applications.").
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.
Related documentation¶
Sources¶
SAIF.Framework.Logging/clsLogTrace.vbSAIF.Framework.Logging/TraceInfoStruct.vb