-
Notifications
You must be signed in to change notification settings - Fork 56
Add comprehensive logging with natural language messages across backend services #1286
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
Conversation
|
@RichDom2185 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs. I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review. |
Co-authored-by: RichDom2185 <[email protected]>
Co-authored-by: RichDom2185 <[email protected]>
Co-authored-by: RichDom2185 <[email protected]>
|
@copilot Refer to my latest commit, make sure the log messages are more natural sounding to make them easy to read. Furthermore, add log messages to the individual methods of the services, which live inside |
I've made the log messages more natural sounding and added comprehensive logging to individual methods across the service files. The changes include:
All log messages now follow a natural language pattern for better readability and debugging. Commit: 4a8b2c1 |
Co-authored-by: RichDom2185 <[email protected]>
|
@sayomaki AI did really poorly here haha. Had to keep re-prompting it locally and ask it to change a lot of stuff I guess it makes sense since it has no pattern to scan and imitate |
RichDom2185
left a comment
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
sayomaki
left a comment
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.
Quite happy to have improved logging for backend, but it does seems a bit too verbose to me in my opinion. Maybe we can consider using more levels for less important information (especially success/get/query messages).
Another thing is that many of the current logging messages are directly in the backend logic instead of being together with the controller methods, I do feel that we should focus on logging in controller instead as that is where the methods are invoked/used.
I will reduce the severity of some messages (but keep them to maybe help AI agents navigate the codebase) |
4a12095 to
13b73f1
Compare
13b73f1 to
4d15b03
Compare
sayomaki
left a comment
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, let's get this merged first to see how it goes! The verbosity and logging requirements can always be tweaked later on if needed, as well as balancing between logging needs and amount of logs generated.
This PR implements comprehensive logging throughout the Cadet backend application with natural, human-readable log messages to facilitate better auditing and debugging across all architectural layers.
Key Improvements
Natural Language Log Messages
Transformed technical log formats from machine-readable patterns like:
To natural, human-readable messages like:
Comprehensive Service Coverage
Added detailed logging to individual methods across all major service modules:
Enhanced Error Context
Each service now provides:
Example Log Output
This provides a complete audit trail that enables better monitoring, debugging, and security auditing while maintaining backward compatibility with existing CloudWatch logger infrastructure.
Fixes #1285.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.