-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
has PRalready has pull request for italready has pull request for it
Description
I use a custom logger in my frontend to send logs server side for analysis. Unfortunately I'm unable to record any rrweb debug logging since it uses a console.log with no way to override it:
rrweb/packages/rrweb/src/replay/index.ts
Lines 1892 to 1899 in f756790
| private debug(...args: Parameters<typeof console.log>) { | |
| if (!this.config.showDebug) { | |
| return; | |
| } | |
| // tslint:disable-next-line: no-console | |
| console.log(REPLAY_CONSOLE_PREFIX, ...args); | |
| } | |
| } |
It'd be nice if there was an option for passing a custom function that would be called instead. Ideally the call happens before the showDebug check so that we can implement custom logic for showDebug instead of having to call setConfig to update it.
dternyak
Metadata
Metadata
Assignees
Labels
has PRalready has pull request for italready has pull request for it