-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add custom log payload support to logFormatter #4619
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.
Everything works well, and I like the format and idea! 🗒
But just a little detail, I think you put one round brackets too many in your example.
logger.debug({ custom: { my_custom: value } } ), 'Custom debug logging')
logger.debug({ custom: { my_custom: value } }, 'Custom debug logging')
But when I removed it, it works as expect 👍
Yup, I did. Bad copy and paste. Thanks! |
…rojects-to-yarn-3 * 'main' of github.com:redwoodjs/redwood: (29 commits) Update dependency eslint-config-prettier to v8.5.0 (#4631) Update dependency msw to v0.38.2 (#4630) Update dependency @clerk/types to v1.27.0 (#4628) Update dependency @clerk/clerk-js to v2.16.0 (#4627) Update dependency @types/react-dom to v17.0.13 (#4629) Update dependency @types/testing-library__jest-dom to v5.14.3 (#4624) Update dependency @types/aws-lambda to v8.10.93 (#4620) Webhook verifiers: Make them all support timestamp diff check (#4608) Add custom log payload support to logFormatter (#4619) Update dependency @types/react-dom to v17.0.12 (#4621) part II of #4623 (#4626) Update dependency systeminformation to v5.11.6 (#4611) Update dependency @clerk/clerk-js to v2.15.0 (#4606) remove Redwood extension from vscode rec (#4613) (fixture chore) pin fixture autoprefixer 9.8.8 (#4623) update yarn.lock v0.47.1 update yarn.lock fixi(prisma): Set default cwd for runCommand task to base (#4604) Update actions/checkout action to v3 (#4610) ...
…ors-db-auth * 'main' of github.com:redwoodjs/redwood: [WIP] Enable yarn 3 for Redwood projects (#4444) Update dependency eslint-config-prettier to v8.5.0 (#4631) Update dependency msw to v0.38.2 (#4630) Update dependency @clerk/types to v1.27.0 (#4628) Update dependency @clerk/clerk-js to v2.16.0 (#4627) Update dependency @types/react-dom to v17.0.13 (#4629) Update dependency @types/testing-library__jest-dom to v5.14.3 (#4624) Update dependency @types/aws-lambda to v8.10.93 (#4620) Webhook verifiers: Make them all support timestamp diff check (#4608) Add custom log payload support to logFormatter (#4619)
Fixes #4154
As part of making dev logging less verbose, only certain objects were being logged: queries, timing, etc.
But, sometimes one wants to log ad-hoc custom payloads when debugging, but currently one has to use:
This PR adds the
custom
option:which will format the message text or object in a readable way with a label and emoji.