-
Notifications
You must be signed in to change notification settings - Fork 531
fix(logging): handle missing id and task in verbose logs #1343
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: develop
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This PR fixes potential AttributeError
exceptions in verbose logging by adding safe attribute access for id
and task
fields in log records. The changes ensure the logging system gracefully handles cases where these attributes may be missing.
Key Changes
- Replaces direct attribute access with
getattr()
calls using default values - Provides fallback display formatting when
id
is missing - Uses "unknown" as default for missing
task
attributes
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Update verbose logging to safely handle cases where log records may not have 'id' or 'task' attributes. Prevents potential AttributeError and improves robustness of LLM and prompt log output formatting.
74fb99c
to
3018311
Compare
required by #1339 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1343 +/- ##
========================================
Coverage 70.70% 70.71%
========================================
Files 161 161
Lines 16312 16317 +5
========================================
+ Hits 11533 11538 +5
Misses 4779 4779
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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.
LGTM
Update verbose logging to safely handle cases where log records may not have 'id' or 'task' attributes. Prevents potential
AttributeError
and improves robustness of LLM and prompt log output formatting.