-
Notifications
You must be signed in to change notification settings - Fork 0
Add trace logging for the DNS server #17
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
base: master
Are you sure you want to change the base?
Conversation
Co-Authored-By: Daniel Fangl <[email protected]>
Co-authored-by: Dominik Schubert <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR enhances DNS server logging in LocalStack and introduces a new configuration option for custom logging overrides.
- Added
LOGGING_OVERRIDE
configuration for fine-grained control of logger levels - Implemented
parse_key_value_pairs
function inlocalstack/utils/collections.py
for parsing environment variable-like strings - Set default DNS logging level to INFO in debug mode
- Added debug logging statements in
localstack/dns/server.py
for detailed DNS query information - Included unit tests for the new
parse_key_value_pairs
function intests/unit/utils/test_collections.py
5 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings
except Exception as e: | ||
raise RuntimeError( | ||
f"Failed to configure logging overrides ({raw_logging_override})" | ||
) from e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Consider logging the exception details for easier debugging
@@ -533,3 +533,24 @@ def is_comma_delimited_list(string: str, item_regex: Optional[str] = None) -> bo | |||
if pattern.match(string) is None: | |||
return False | |||
return True | |||
|
|||
|
|||
def parse_key_value_pairs(raw_text: str) -> dict: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Consider adding type hints to the function signature for better code readability and IDE support
Motivation
Building on localstack#10808, we want to enable debug logging for the DNS server.
Changes
Requires localstack#10808