Skip to content

API reference

Types

Type Kind Namespace Purpose
SaifLogBase Abstract class SAIF.NetCore.Services.Logging Shared logging engine: threshold resolution, override application, correlation, and the dispatch surface every host-style logger inherits.
SaifLog Class SAIF.NetCore.Logging Web-host logger; configures an Event Log sink, a Console sink, and a LoggingApiSink, with both non-error and error routes.
SaifWindowsServiceLog Class SAIF.NetCore.Services.Logging Windows Service-host logger; configures an Event Log sink, a LoggingApiSink, and a Console sink; never reads the error route.
ConsoleLogService Class SAIF.NetCore.Services.Logging.Console Console-host logger; Event Log sink (attached at Fatal) plus a Console sink, with up to five separate, lazily-configured auxiliary file channels reached only via explicit WriteToAppLog/GetLog calls.
IConsoleLogService Interface SAIF.NetCore.Services.Logging DI-facing contract implemented by ConsoleLogService; declares all 20 log-method overloads plus GetLog/WriteToAppLog/BaseLevel/IsConfigured.
ILogWriter Interface SAIF.NetCore.Services.Logging.Console Contract for the auxiliary file-writing channel used by ConsoleLogService's File0–File4 outputs.
LogWriter Class SAIF.NetCore.Services.Logging.Console Lazily-configuring file writer backing one of the console host's five auxiliary file channels, each with its own Verbose-level switch.
LogType Enum SAIF.NetCore.Services.Logging.Console Identifies which of the five auxiliary file channels (File0–File4) a WriteToAppLog/GetLog call targets.
ErrorLogItem Class SAIF.NetCore.Services.Logging.Data Structured error DTO with nine properties (ApplicationName, Environment, MachineName, PageName, UserName, ErrorDate, ExceptionInfo, ExceptionSource, StateInfo); no LogId/StackTrace/RequestDetails property.
IExceptionFormatService Interface SAIF.NetCore.Services.Logging.Formatters Contract for building an ErrorLogItem from a log message and an Exception (GetErrorDetails).
ExceptionFormatService Class SAIF.NetCore.Services.Logging.Formatters Base exception formatter used directly by the Windows Service and console loggers; also the base type for the web formatter.
WebRequestDetails Class SAIF.NetCore.Services.Logging.ExceptionFormatter Captured HTTP request state (unredacted headers/claims/body); rendered as text into ErrorLogItem.StateInfo, never attached as a structured object.
SaifLogConfigurationException Exception class SAIF.NetCore.Services.Logging.Exceptions Thrown when a SaifLogging:Loggers override entry has an invalid or missing Type; only constructor is (string message).
LogEventExtensions Static class SAIF.NetCore.Services.Logging.Extensions Two extension methods on Serilog LogEvent — LogId() and LogExceptionDetail() — for reading back this library's attached properties.
LogLevelExtensions Static class SAIF.NetCore.Services.Logging Converts level strings/LogLevel/LogEventLevel; ToLogLevel(string) returns SAIF.NetCore.Services.Contracts.LogLevel, not a Serilog type.
WebHostBuilderExtensions Static class SAIF.NetCore.Services.Logging.Web Host-wiring extension (UseSaifLog()) that is exactly return builder.UseSerilog(); on IWebHostBuilder.
StringValues Static class SAIF.NetCore.Services.Logging Centralized string constants for configuration keys, section names, and Serilog property names used throughout the library.
SaifLoggerConfig Class SAIF.NetCore.Services.Logging Base sink-config shape (Pattern/Level/LoggerType); has an implicit parameterless constructor and performs no Environment API resolution itself — that is done by the internal ApiLoggerConfig subclass.

Sources

  • src/SAIF.NetCore.Logging/SAIF.NetCore.Logging/SAIF.NetCore.Logging/SAIF.NetCore.Logging.csproj