---
title: API reference
summary: Public types exposed by this library.
status: draft
owner: SAIF Platform Team
last_reviewed: 2026-10-02
library: SAIF.NetCore.Logging
reference_type: package
---

# API reference

## Types

| Type | Kind | Namespace | Purpose |
| --- | --- | --- | --- |
| [SaifLogBase](SAIF.NetCore.Services.Logging/SaifLogBase.md) | Abstract class | `SAIF.NetCore.Services.Logging` | Shared logging engine: threshold resolution, override application, correlation, and the dispatch surface every host-style logger inherits. |
| [SaifLog](SAIF.NetCore.Logging/SaifLog.md) | 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](SAIF.NetCore.Services.Logging/SaifWindowsServiceLog.md) | 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](SAIF.NetCore.Services.Logging.Console/ConsoleLogService.md) | 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](SAIF.NetCore.Services.Logging/IConsoleLogService.md) | Interface | `SAIF.NetCore.Services.Logging` | DI-facing contract implemented by `ConsoleLogService`; declares all 20 log-method overloads plus `GetLog`/`WriteToAppLog`/`BaseLevel`/`IsConfigured`. |
| [ILogWriter](SAIF.NetCore.Services.Logging.Console/ILogWriter.md) | Interface | `SAIF.NetCore.Services.Logging.Console` | Contract for the auxiliary file-writing channel used by `ConsoleLogService`'s `File0`–`File4` outputs. |
| [LogWriter](SAIF.NetCore.Services.Logging.Console/LogWriter.md) | 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](SAIF.NetCore.Services.Logging.Console/LogType.md) | Enum | `SAIF.NetCore.Services.Logging.Console` | Identifies which of the five auxiliary file channels (`File0`–`File4`) a `WriteToAppLog`/`GetLog` call targets. |
| [ErrorLogItem](SAIF.NetCore.Services.Logging.Data/ErrorLogItem.md) | 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](SAIF.NetCore.Services.Logging.Formatters/IExceptionFormatService.md) | Interface | `SAIF.NetCore.Services.Logging.Formatters` | Contract for building an `ErrorLogItem` from a log message and an `Exception` (`GetErrorDetails`). |
| [ExceptionFormatService](SAIF.NetCore.Services.Logging.Formatters/ExceptionFormatService.md) | 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](SAIF.NetCore.Services.Logging.ExceptionFormatter/WebRequestDetails.md) | 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](SAIF.NetCore.Services.Logging.Exceptions/SaifLogConfigurationException.md) | 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](SAIF.NetCore.Services.Logging.Extensions/LogEventExtensions.md) | 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](SAIF.NetCore.Services.Logging/LogLevelExtensions.md) | Static class | `SAIF.NetCore.Services.Logging` | Converts level strings/`LogLevel`/`LogEventLevel`; `ToLogLevel(string)` returns `SAIF.NetCore.Services.Contracts.LogLevel`, not a Serilog type. |
| [WebHostBuilderExtensions](SAIF.NetCore.Services.Logging.Web/WebHostBuilderExtensions.md) | Static class | `SAIF.NetCore.Services.Logging.Web` | Host-wiring extension (`UseSaifLog()`) that is exactly `return builder.UseSerilog();` on `IWebHostBuilder`. |
| [StringValues](SAIF.NetCore.Services.Logging/StringValues.md) | Static class | `SAIF.NetCore.Services.Logging` | Centralized string constants for configuration keys, section names, and Serilog property names used throughout the library. |
| [SaifLoggerConfig](SAIF.NetCore.Services.Logging/SaifLoggerConfig.md) | 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. |

## Related documentation
- [Index](../index.md)
- [Overview](../overview.md)
- [Architecture](../architecture.md)
- [Dependencies](../dependencies.md)
- [Configuration](../configuration.md)
- [Service registration](../service-registration.md)
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)

## Sources
- `src/SAIF.NetCore.Logging/SAIF.NetCore.Logging/SAIF.NetCore.Logging/SAIF.NetCore.Logging.csproj`
