Closed jakobhec closed 1 week ago
Hello,
config.debug = true
is just a shortcut for Posthog().debug(true)
, so the SDK already starts in debug mode and logs things in the console.
Calling Posthog().debug(kDebugMode);
at runtime will enable and disable logging based on your needs.
Somehow a dupe of https://github.com/PostHog/posthog-flutter/issues/88 that we can address in this other ssue
So, this is just about printing to the console? It doesn’t affect the functionality or the events being sent at all?
So, this is just about printing to the console? It doesn’t affect the functionality or the events being sent at all?
Correct. https://posthog.com/docs/libraries/android#all-configuration-options
// Logs the SDK messages into Logcat. (off/false by default)
Same goes for iOS.
Problem Statement
It would be really helpful if the
com.posthog.posthog.DEBUG
parameter,config.debug
andPosthog().debug()
had an explanation, ideally directly in the code.What does
config.debug
do in this example from the documentation? https://github.com/PostHog/posthog-flutterDoes it do the same as
Posthog().debug(true)
?Or does this code do the same as the code from the example above? I set it to
false
initially but then use.debug(true)
?Why is this always set to
true
in the examples? Does it make sense to set it totrue
only if we’re debugging the app? Does it make a difference?Solution Brainstorm
No response