Skip to content

NLogRequestLoggingModule - Introduce ShouldLogRequest #1075

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
snakefoot opened this issue Apr 6, 2025 · 0 comments
Open

NLogRequestLoggingModule - Introduce ShouldLogRequest #1075

snakefoot opened this issue Apr 6, 2025 · 0 comments
Milestone

Comments

@snakefoot
Copy link
Contributor

snakefoot commented Apr 6, 2025

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))

@snakefoot snakefoot added this to the 6.0 milestone Apr 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant