Skip to content

Informatievlaanderen/http-logging-filter

Repository files navigation

Be.Vlaanderen.Basisregisters.AspNetCore.Mvc.Logging Build Status

A filter which logs HTTP calls. By default logs POST and PUT.

Usage

public IServiceProvider ConfigureServices(IServiceCollection services)
{
    services
        .AddMvcCore(options =>
        {
            ...
            options.Filters.Add(new LoggingFilterFactory());
            ...
        })
    ...
}
public IServiceProvider ConfigureServices(IServiceCollection services)
{
    services
        .AddMvcCore(options =>
        {
            ...
            options.Filters.Add(new LoggingFilterFactory(new []{ "GET", "POST", "PUT", "DELETE" }));
            ...
        })
    ...
}