Open
Description
Problem Statement
Currently, the default logger used by Sentry is globalThis.console
. However, our app has multiple transports for logging (remote, file, console etc.)
With current Sentry implementation, we cannot redirect default Sentry logs to any of our transports without modifying the global console object.
Solution Brainstorm
We suggest adding a new configuration option that allows to specify the logging module, the same way you can specify a transport
.
I would expect LoggerConsoleMethods
to be exported as a common interface to adhere to. The logger
configuration option would be:
// When specified, used in place of the global `console.log`.
logger?: LoggerConsoleMethods
Metadata
Metadata
Assignees
Type
Projects
Status
No status
Status
No status
Status
No status