SAIF.Framework.Logging overview¶
Documentation context: nuspec-referenced
This library is packaged into
SAIF.BOF.Frameworkvia the repository-root-relative nuspec glob inSAIF.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 remotewsLoggingSOAP 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 viaIsEnabled(defaultsFalse).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:Publicshared helper exposingPublic Constformat constants as part of the external surface; its web/non-web context detection, environment/application-name derivation, and related properties/methods areFriend-scoped (assembly-internal).clsLoginLog: Legacy login-event logger writing directly to a monthly CSV file.clsLoggingQueues: MSMQ queue path-name helper resolved fromConfigurationManager.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.
Related documentation¶
Sources¶
SAIF.Framework.Logging/clsLogAudit.vbSAIF.Framework.Logging/clsLogError.vbSAIF.Framework.Logging/clsLogTrace.vbSAIF.Framework.Logging/clsLogCommon.vbSAIF.Framework.Logging/clsLoginLog.vbSAIF.Framework.Logging/clsLoggingQueues.vbSAIF.Framework.Logging/LogList.vbSAIF.Framework.Logging/SAIF.BOF.Framework.Logging.vbprojSAIF.Framework.Core/SAIF.BOF.Framework.Core.nuspec