Skip to content

Latest commit

 

History

History
11 lines (6 loc) · 894 Bytes

services_logging.md

File metadata and controls

11 lines (6 loc) · 894 Bytes

Configuring Debug Logging

The library can output debug logging if the client application provides a standard ILoggerFactory object. This should only be activated when debugging is actually required as it can generate a large amount of log data in a busy application.

The library's EventStreamConfigService object exposes an ILoggerFactory property called LoggerFactory, and the recommended lambda-style service configuration helpers each accept an optional loggerFactory argument (refer to the dependency injection and non-injected topics).

The demo project shows how to wire up Serilog for console-based logger output, although any Microsoft.Extensions.Logging-compatible ILoggerFactory should work. (Most other logging packages such as NLog now support this model.)


Return to the Library Services topic