Enabling HTTP Logging and Support for Logging

Enabling HTTP logging

HTTP logging is an optional middleware component that logs information about HTTP requests and HTTP responses, including the following:

  • Information about the HTTP request

  • Headers

  • Body

  • Information about the HTTP response

This is valuable in web services for auditing and debugging scenarios, but beware because it can negatively impact performance. We might also log personally identifiable information (PII), which can cause compliance issues in some jurisdictions.

Log levels

Log levels can be set to the following:

  • Error: Only Error level logs

  • Warning: Error and Warning level logs

  • Information: Error, Warning, and Information level logs

  • Verbose: All level logs

Get hands-on with 1400+ tech skills courses.