-
Notifications
You must be signed in to change notification settings - Fork 112
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
Override Notion Client logger #2620
Conversation
message: string, | ||
extraInfo: Record<string, unknown> | ||
) => { | ||
console.log(`[${level}]: ${message}`, extraInfo); |
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.
Why not directly use a logger here? potentially deactivating after that?
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.
We def don't want those logs to clutter our DD errors no ? The'll handle the requests to notion, and we'll do the logging if where we need it wdyt ?
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.
I'm not too worried about cluttering. But my point here is that console.log will clutter more than logger ?
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.
I removed the console.log and no-op instead > want me to add back a log in info?
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.
OK added back with a logger.info so we keep them but stop being spammed with errors
Trying to prevent NotionClient to spam our datadog: https://app.datadoghq.eu/logs?query=-status%3A%28warn%20OR%20info%29&cols=host%2Cservice&index=%2A&messageDisplay=inline&refresh_mode=sliding&stream_sort=desc&viz=stream&from_ts=1700649104874&to_ts=1700650004874&live=true