This page captures business rules enforced by this library.
BR-001: Audit logging is opt-in and disabled by default¶
Field
Value
Statement
Audit logging is disabled by default and must be explicitly enabled by a hosting application before any audit record is produced.
Trigger
Any call to AuditMessage/AuditCustomMessage.
Enforcement
clsLogAudit.IsEnabled (Shared property, defaults False) is checked before any work is performed.
Outcome
No audit record is produced unless a caller explicitly sets clsLogAudit.IsEnabled = True.
Confidence
Verified
Source
SAIF.Framework.Logging/clsLogAudit.vb
BR-002: Trace logging is opt-in via flag or command-line switch, but functionally inert¶
Field
Value
Statement
Trace logging can be gated on via a flag or command-line switch, but no trace data is ever actually written regardless of the gate state.
Trigger
Any call to MethodBegin/MethodEnd/MethodMessage.
Enforcement
clsLogTrace.IsEnabled (Shared flag) OR (non-web) command line containing "TRACEON" OR UserTraceEnabled (current user matches TraceUser) gate the call; however, the private WriteMessage sink is a no-op.
Outcome
Even when a caller enables tracing, no trace data is ever written to file or web service — the feature is deprecated in-place.
Confidence
Verified
Source
SAIF.Framework.Logging/clsLogTrace.vb
BR-003: File-based logging is prohibited in web applications¶
Field
Value
Statement
Redirecting a logging class's output to a local file is prohibited when the caller is a web application.
Trigger
Any call to ToFile()/ToFile(name) on clsLogAudit, clsLogError, or clsLogTrace.
Enforcement
If IsWeb Then Throw New ApplicationException("Logging to files not valid for web applications.")
Outcome
Web applications must use the web-service sink (wsLogging); only non-web (WinForms/batch/console) apps may redirect logging to a local file.
BR-004: ASP.NET ViewState errors are never logged¶
Field
Value
Statement
Exceptions identified as ASP.NET ViewState tampering/disconnect noise are dropped entirely rather than logged.
Trigger
clsLogError.CreateError/CreateErrorWithEmail is called with an exception whose formatted info contains ViewState-related text.
Enforcement
clsLogError.SuppressLogging() checks ErrorInfo.ExceptionInfo (uppercased) for "AUTHENTICATION OF VIEWSTATE FAILED" or "INVALID_VIEWSTATE_CLIENT_DISCONNECTED".
Outcome
The error is dropped entirely (method returns False, no file/web-service write occurs).
Confidence
Verified
Source
SAIF.Framework.Logging/clsLogError.vb
BR-005: Logging failures must never raise exceptions to the caller¶
Field
Value
Statement
A failure within any logging operation must never propagate as an exception to the calling application.
Trigger
All logging entry points.
Enforcement
Every logging operation body (or its private write helpers) is wrapped in Try...Catch with an empty/'gobble gobble catch block, silently swallowing failures (SOAP call failures, file I/O errors, reflection errors, etc.).
Outcome
Application logging is best-effort; a failure to log (e.g., web service unreachable) never causes the calling application to fail.