Open statico opened 1 year ago
I think the solution here would be to implement a debugLevel
so you can define eg debug
, error
, fatal
levels, and this filter out the console logs.
Btw you can still do posthog.debug(false)
at runtime, or just don't use debug={__DEV__}
since it's disabled by default anyway.
The loggingEnabled
suggestion is pretty much what's already available.
Is your feature request related to a problem?
When using
<PostHogProvider apiKey={...} debug={__DEV__}>
, PostHog produces absurd amounts of logging with "PostHog Debug" messages, especially if you have heavy instrumentation. This is very distracting and can hide more important log messages.Describe the solution you'd like
Add an option to PostHogProvider like
quiet
orloggingEnabled={false}
that can be used to disable the logging.Describe alternatives you've considered
patch-package
(currently doing this)Related sub-libraries
Additional context
<3