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

fix: only logging if debug enabled #284

Merged
merged 3 commits into from
Oct 14, 2024
Merged

fix: only logging if debug enabled #284

merged 3 commits into from
Oct 14, 2024

Conversation

marandaneto
Copy link
Member

@marandaneto marandaneto commented Oct 14, 2024

Problem

Closes PostHog/posthog-react-native-session-replay#7

Changes

Only logs message if debug is enabled

Release info Sub-libraries affected

Bump level

  • Major
  • Minor
  • Patch

Libraries affected

  • All of them
  • posthog-web
  • posthog-node
  • posthog-react-native

Changelog notes

  • Added support for X

Copy link

github-actions bot commented Oct 14, 2024

Size Change: +191 B (+0.18%)

Total Size: 105 kB

Filename Size Change
posthog-node/lib/index.cjs.js 20 kB +29 B (+0.15%)
posthog-node/lib/index.esm.js 20 kB +29 B (+0.15%)
posthog-react-native/lib/posthog-core/src/index.js 9.72 kB +32 B (+0.33%)
posthog-react-native/lib/posthog-react-native/src/posthog-rn.js 3.8 kB +36 B (+0.96%)
posthog-react-native/lib/posthog-react-native/src/version.js 123 B +1 B (+0.82%)
posthog-web/lib/index.cjs.js 17.1 kB +32 B (+0.19%)
posthog-web/lib/index.esm.js 17.1 kB +32 B (+0.19%)
ℹ️ View Unchanged
Filename Size
posthog-react-native/lib/posthog-core/src/eventemitter.js 1.08 kB
posthog-react-native/lib/posthog-core/src/lz-string.js 1.42 kB
posthog-react-native/lib/posthog-core/src/types.js 365 B
posthog-react-native/lib/posthog-core/src/utils.js 822 B
posthog-react-native/lib/posthog-core/src/vendor/uuidv7.js 2.04 kB
posthog-react-native/lib/posthog-react-native/index.js 485 B
posthog-react-native/lib/posthog-react-native/src/autocapture.js 1.78 kB
posthog-react-native/lib/posthog-react-native/src/frameworks/wix-navigation.js 651 B
posthog-react-native/lib/posthog-react-native/src/hooks/useFeatureFlag.js 437 B
posthog-react-native/lib/posthog-react-native/src/hooks/useFeatureFlags.js 362 B
posthog-react-native/lib/posthog-react-native/src/hooks/useLifecycleTracker.js 416 B
posthog-react-native/lib/posthog-react-native/src/hooks/useNavigationTracker.js 628 B
posthog-react-native/lib/posthog-react-native/src/hooks/usePostHog.js 249 B
posthog-react-native/lib/posthog-react-native/src/legacy.js 810 B
posthog-react-native/lib/posthog-react-native/src/native-deps.js 1.17 kB
posthog-react-native/lib/posthog-react-native/src/optional/OptionalAsyncStorage.js 183 B
posthog-react-native/lib/posthog-react-native/src/optional/OptionalExpoApplication.js 215 B
posthog-react-native/lib/posthog-react-native/src/optional/OptionalExpoDevice.js 211 B
posthog-react-native/lib/posthog-react-native/src/optional/OptionalExpoFileSystem.js 224 B
posthog-react-native/lib/posthog-react-native/src/optional/OptionalExpoLocalization.js 216 B
posthog-react-native/lib/posthog-react-native/src/optional/OptionalReactNativeDeviceInfo.js 220 B
posthog-react-native/lib/posthog-react-native/src/optional/OptionalReactNativeNavigation.js 218 B
posthog-react-native/lib/posthog-react-native/src/optional/OptionalReactNativeNavigationWix.js 222 B
posthog-react-native/lib/posthog-react-native/src/optional/OptionalSessionReplay.js 231 B
posthog-react-native/lib/posthog-react-native/src/PostHogContext.js 210 B
posthog-react-native/lib/posthog-react-native/src/PostHogProvider.js 1.49 kB
posthog-react-native/lib/posthog-react-native/src/storage.js 1.09 kB
posthog-react-native/lib/posthog-react-native/src/types.js 90 B

compressed-size-action

Copy link
Member

@pauldambra pauldambra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/PostHog/posthog-js/blob/main/src/utils/logger.ts

could do something like that but not blocking :)

@marandaneto
Copy link
Member Author

PostHog/posthog-js@main/src/utils/logger.ts

could do something like that but not blocking :)

yep and it'd help with #113 but focusing on a quick fix for now

@marandaneto marandaneto merged commit 2b56d75 into main Oct 14, 2024
4 checks passed
@marandaneto marandaneto deleted the fix/onlylog-if-debug branch October 14, 2024 07:39
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

Successfully merging this pull request may close these issues.

excessive logging from replay
2 participants