Show / Hide Table of Contents

    Class ServiceCollectionExtensions

    Extension methods for Microsoft.Extensions.DependencyInjection.IServiceCollection to add Serilog to the logger pipeline.
    Inheritance
    Object
    ServiceCollectionExtensions
    Namespace: XploRe.Logging.Serilog
    Assembly: XploRe.Logging.Serilog.dll
    Syntax
    public static class ServiceCollectionExtensions : Object

    Methods

    Name Description
    AddSerilog(IServiceCollection) Adds logging services to the specified Microsoft.Extensions.DependencyInjection.IServiceCollection and registers the Serilog logging provider using the static Serilog.Log logger, which will be disposed with the logger factory.
    AddSerilog(IServiceCollection, ILogger) Adds logging services to the specified Microsoft.Extensions.DependencyInjection.IServiceCollection and registers the Serilog logging provider using the provided logger.
    AddSerilog(IServiceCollection, ILogger, Action<ILoggingBuilder>) Adds logging services to the specified Microsoft.Extensions.DependencyInjection.IServiceCollection and registers the Serilog logging provider using the provided logger.
    AddSerilog(IServiceCollection, Action<LoggerConfiguration>) Adds logging services to the specified Microsoft.Extensions.DependencyInjection.IServiceCollection that use the static Serilog.Log Serilog logger which is configured via the provided delegate. The static Serilog logger will be automatically disposed with the logger factory service.
    AddSerilog(IServiceCollection, Boolean, Action<LoggerConfiguration>) Adds logging services to the specified Microsoft.Extensions.DependencyInjection.IServiceCollection that use the Serilog logger which is configured via the provided delegate. The Serilog logger will be automatically disposed with the logger factory service.
    Back to top Copyright © 2017-2018, xplo.re IT Services, Michael Maier. All rights reserved.