Skip to content

NLogRequestLoggingModule - Introduce ShouldLogRequest #1075

Description

@snakefoot

Like ShouldLogRequest is available for NLogRequestLoggingMiddleware, so one can downgrade LogLevel, then it should always be available for NLogRequestLoggingModule.

Maybe consider changing the logging so when LogLevel <= Info, then skip logging the exception. But just perform logging of the Exception.Type and Exception.Message (Ex. Input-Validation-Errors).

This could also be useful for ASP.NET Core, where HTTP 499 Client Closed Request together with TaskCanceledException should not be seen as "Error" (catch (OperationCanceledException) when (httpContext.RequestAborted.IsCancellationRequested))

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions