Skip to content
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

console.dir produces rrweb logger error: #967

Closed
bitjson opened this issue Jan 24, 2024 · 3 comments
Closed

console.dir produces rrweb logger error: #967

bitjson opened this issue Jan 24, 2024 · 3 comments

Comments

@bitjson
Copy link

bitjson commented Jan 24, 2024

My application uses console.dir to log very large/complex objects to the console for advanced users to explore. console.dir provides a better UX across most browsers than console.log (even though, in most modern browsers, console.log doesn't always attempt to convert values to a string).

Is there some workaround to tell PostHog to pretend console.dir is console.log, or even to disable rrweb on console.dir calls?

Thanks!

@pauldambra
Copy link
Member

Hey @bitjson is this separate to #968

I've just checked I can use e.g. console.dir('foo')

@bitjson
Copy link
Author

bitjson commented Jan 25, 2024

Ah, no error message was produced, so I assumed that console.dir wasn't expected to work.

It seems like most of the problem is #968, there's just a small additional issue here of console.dir not returning (some?) internal errors. When I pass a BigInt to console.dir, I see only rrweb logger error: and no further message or context.

@pauldambra
Copy link
Member

I'll close this for now, and we can revisit it if #968 doesn't clear everything

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants