Skip to content
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

Introduce option to enable HTTP logging #176

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lg2de
Copy link

@lg2de lg2de commented Aug 16, 2024

Allow enabling HTTP logging using docker environment variable

  • Add UseHttpLogging and configure minimal logging content.
  • Please note, the default logging severity remains at "Warning" which should not change the current output.
  • Explicit configure "simple" logging with option "SingleLine" to get better overview in docker logs.
  • Add description how to enable HTTP logging by setting LogLevel to "Information".

* Add UseHttpLogging and configure minimal logging content.
* Please note, the default logging severity remains at "Warning" which should not change the current output.
* Explicit configure "simple" logging with option "SingleLine" to get better overview in docker logs.
* Add description how to enable HTTP logging by setting LogLevel to "Information".
@@ -77,6 +90,11 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
app.UseStatusCodePages();
}

// activate HTTP logging option
// The default severity on the Console is currently "Warning".
// So, the logging is not visible by default but can be easily activated using environment variable.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't warnings and errors still get logged by default? So "most of the logging..." would be more accurate.

environment:
- Logging__Console__LogLevel__Microsoft.AspNetCore.HttpLogging.HttpLoggingMiddleware=Information
```

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a section specifically about how to load secrets from a file. Please make a new chapter ## Logging, maybe directly under ##Statistics just before the secret loading chapter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants