Open
Conversation
Co-Authored-By: Daniel Fangl <daniel.fangl@localstack.cloud>
Co-authored-by: Dominik Schubert <dominik.schubert91@gmail.com>
There was a problem hiding this comment.
PR Summary
This PR enhances DNS server logging in LocalStack and introduces a new configuration option for custom logging overrides.
- Added
LOGGING_OVERRIDEconfiguration for fine-grained control of logger levels - Implemented
parse_key_value_pairsfunction inlocalstack/utils/collections.pyfor parsing environment variable-like strings - Set default DNS logging level to INFO in debug mode
- Added debug logging statements in
localstack/dns/server.pyfor detailed DNS query information - Included unit tests for the new
parse_key_value_pairsfunction intests/unit/utils/test_collections.py
5 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings
Comment on lines
+96
to
+99
| except Exception as e: | ||
| raise RuntimeError( | ||
| f"Failed to configure logging overrides ({raw_logging_override})" | ||
| ) from e |
There was a problem hiding this comment.
style: Consider logging the exception details for easier debugging
| return True | ||
|
|
||
|
|
||
| def parse_key_value_pairs(raw_text: str) -> dict: |
There was a problem hiding this comment.
style: Consider adding type hints to the function signature for better code readability and IDE support
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.
Motivation
Building on localstack#10808, we want to enable debug logging for the DNS server.
Changes
Requires localstack#10808