Conversation
The logging level can now be set either with the "log-level"/"l" parameter or the LOG_LEVEL environment variable. Added the TRACE level to dump in logs all the inspected HTTP headers. Fixes #2 Signed-off-by: Francesco Giudici <dev@foggy.day>
There was a problem hiding this comment.
Pull request overview
This pull request implements command-line control for logging levels, addressing issue #2. It adds a new -l/--log-level flag to configure logging verbosity and introduces a TRACE level for maximum verbosity. The implementation allows the flag to override the LOG_LEVEL environment variable, providing flexible logging configuration through both command-line and environment variables.
Changes:
- Added TRACE as the most verbose logging level for dumping all HTTP headers
- Implemented
-l/--log-levelcommand-line flag that overrides LOG_LEVEL environment variable - Enhanced debug logging to show configuration details at startup
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| pkg/logging/logging.go | Added TRACE level constant, implemented Tracef() function, and updated documentation to include TRACE level |
| pkg/headers/headers.go | Improved log message terminology from "Dropping" to "Redact" and added TRACE logging for all headers |
| cmd/cmd.go | Added log-level flag, integrated flag value into logging initialization, and added debug logging for startup configuration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Francesco Giudici <dev@foggy.day>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The logging level can now be set either with the "log-level"/"l" parameter or the LOG_LEVEL environment variable.
Added the TRACE level to dump in logs all the inspected HTTP headers.
Fixes #2