-
Notifications
You must be signed in to change notification settings - Fork 210
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
use structured logging for email utils #5230
Conversation
Preview URL 🚀 : https://blurts-server-pr-5230-mgjlpikfea-uk.a.run.app |
1 similar comment
Preview URL 🚀 : https://blurts-server-pr-5230-mgjlpikfea-uk.a.run.app |
Preview URL 🚀 : https://blurts-server-pr-5230-mgjlpikfea-uk.a.run.app |
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.
Nice!
Instead of replacing the logger module by the `console.*` variants, and then mocking those variants and inspecting their calls, we can just directly look at the calls to the mocked module.
Preview URL 🚀 : https://blurts-server-pr-5230-mgjlpikfea-uk.a.run.app |
Preview URL 🚀 : https://blurts-server-pr-5230-mgjlpikfea-uk.a.run.app |
Preview URL 🚀 : https://blurts-server-pr-5230-mgjlpikfea-uk.a.run.app |
Preview URL 🚀 : https://blurts-server-pr-5230-mgjlpikfea-uk.a.run.app |
Cleanup completed - database 'blurts-server-pr-5230' destroyed, cloud run service 'blurts-server-pr-5230' destroyed |
References:
Jira: MNTOR-3713
Description
Use the Winston logging library from the email utils so we get structured logging in GCP. Right now log messages are split across several lines which makes it difficult to locate and link to problems.
How to test
Our logging library automatically falls back to console logging in local environments, so the output can be inspected that way. We'll want to check on stage that the output looks acceptable.
Checklist (Definition of Done)