Skip to content

SAIF.Framework.Logging overview

Documentation context: nuspec-referenced

This library is packaged into SAIF.BOF.Framework via the repository-root-relative nuspec glob in SAIF.Framework.Core/SAIF.BOF.Framework.Core.nuspec, and is also directly consumed by sibling framework libraries.

SAIF.Framework.Logging is a cross-cutting, application-agnostic logging utility library that provides audit, error, and (deprecated) trace logging concerns for hosting applications, each dispatching to either a local CSV file or a remote SOAP web service (wsLogging) depending on the hosting application type.

Purpose

  • Provide reusable audit, error, and trace logging entry points (clsLogAudit, clsLogError, clsLogTrace) so that hosting applications do not need to implement their own logging plumbing.
  • Provide secondary/legacy logging utilities: a monthly login-event logger (clsLoginLog), an MSMQ queue path-name helper (clsLoggingQueues), and a deprecated rolling-file logger (LogList) retained for backward compatibility.
  • Consumed by hosting applications (web and non-web/batch) across the SAIF.BOF.Framework ecosystem that need best-effort, non-blocking logging of business events, errors, and (historically) trace data*.

Responsibilities

  • Capture ambient logging context (machine name, application name, page name, environment, current username) for each log record via GetBasic*Info() helper methods.
  • Dispatch log records to exactly one of two sinks per instance: a local CSV file (opened via ToFile()) or the remote wsLogging SOAP web service (default).
  • Suppress noisy, non-actionable ASP.NET ViewState errors before writing (clsLogError.SuppressLogging()).
  • Optionally notify a recipient by email when an error is logged (clsLogError.CreateErrorWithEmail).
  • Swallow all logging failures silently so that logging never causes a calling application to fail.
  • Resolve an MSMQ queue path-name string from configuration (clsLoggingQueues), without performing queue I/O itself.
  • Record user login events to a monthly CSV file (clsLoginLog).

Key components

  • clsLogAudit: Static audit-message logging entry point, opt-in via IsEnabled (defaults False).
  • clsLogError: Exception logging entry point, including ViewState-noise suppression and optional email notification.
  • clsLogTrace: Method-level trace logging entry point — fully disabled and obsolete (see Architecture).
  • clsLogCommon: Public shared helper exposing Public Const format constants as part of the external surface; its web/non-web context detection, environment/application-name derivation, and related properties/methods are Friend-scoped (assembly-internal).
  • clsLoginLog: Legacy login-event logger writing directly to a monthly CSV file.
  • clsLoggingQueues: MSMQ queue path-name helper resolved from ConfigurationManager.AppSettings.
  • LogList: Deprecated, independently designed rolling-file logger retained only for backward compatibility.
  • wsLogging.clsWSLogging: Generated SOAP client proxy used as the remote logging sink.

Sources

  • SAIF.Framework.Logging/clsLogAudit.vb
  • SAIF.Framework.Logging/clsLogError.vb
  • SAIF.Framework.Logging/clsLogTrace.vb
  • SAIF.Framework.Logging/clsLogCommon.vb
  • SAIF.Framework.Logging/clsLoginLog.vb
  • SAIF.Framework.Logging/clsLoggingQueues.vb
  • SAIF.Framework.Logging/LogList.vb
  • SAIF.Framework.Logging/SAIF.BOF.Framework.Logging.vbproj
  • SAIF.Framework.Core/SAIF.BOF.Framework.Core.nuspec