You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently use the js-logger package in all of our JavaScript SDKs. This package is not particularly popular and uses weird TypeScript definitions giving us pain when we try to bundle it.
So, we'd like to migrate away from that package, towards something more usable in modern JavaScript. Most likely, we would define our own simple logging interface and let users implement that. The interface might look like this:
We would continue to export a trivial createDefaultLogger(minLevel?: LogLevel) implementation forwarding logs to console.log. The main benefits is that this reduces our dependency footprint, removes logger features we don't need and makes it easier to integrate custom logging packages for apps that might already depend on those.
This is a breaking change for users providing their own loggers, so feedback and ideas are definitely welcome!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
We currently use the js-logger package in all of our JavaScript SDKs. This package is not particularly popular and uses weird TypeScript definitions giving us pain when we try to bundle it.
So, we'd like to migrate away from that package, towards something more usable in modern JavaScript. Most likely, we would define our own simple logging interface and let users implement that. The interface might look like this:
We would continue to export a trivial
createDefaultLogger(minLevel?: LogLevel)implementation forwarding logs toconsole.log. The main benefits is that this reduces our dependency footprint, removes logger features we don't need and makes it easier to integrate custom logging packages for apps that might already depend on those.This is a breaking change for users providing their own loggers, so feedback and ideas are definitely welcome!
Beta Was this translation helpful? Give feedback.
All reactions