René's URL Explorer Experiment


Title: ref(core): Rewrite `logger` to avoid side effects by mydea · Pull Request #16897 · getsentry/sentry-javascript · GitHub

Open Graph Title: ref(core): Rewrite `logger` to avoid side effects by mydea · Pull Request #16897 · getsentry/sentry-javascript

X Title: ref(core): Rewrite `logger` to avoid side effects by mydea · Pull Request #16897 · getsentry/sentry-javascript

Description: Official Sentry SDKs for JavaScript. Contribute to getsentry/sentry-javascript development by creating an account on GitHub.

Open Graph Description: This has bugged me often already, and I looked into it again nudged by #16846. Today the logger export from core has a side effect and reads from the global. This is a bit weird... This PR rewrites...

X Description: This has bugged me often already, and I looked into it again nudged by #16846. Today the logger export from core has a side effect and reads from the global. This is a bit weird... This PR rewrites...

Opengraph URL: https://github.com/getsentry/sentry-javascript/pull/16897

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.3

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format)
route-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:a2c04237-6d9f-f216-b21a-89e7c778382b
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB118:3BC3E6:4E38F4:65CF66:6B061EF4
html-safe-nonce107e6bbc07db1ac9d378fa5f066834584303d2786c13adba751f31dd570c7961
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMTE4OjNCQzNFNjo0RTM4RjQ6NjVDRjY2OjZCMDYxRUY0IiwidmlzaXRvcl9pZCI6IjUwMTI3MTMyMzI2ODM5MDA2NjAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac7e1b146e50040381fe95459debf39ca3644a6b944f4d69b809a4ac8fc869f3a3
hovercard-subject-tagpull_request:2656116836
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/getsentry/sentry-javascript/16897/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/88186ec3ab323c4f185e610a333b73ca391683c8b3badda9c6aa7a9795329771/getsentry/sentry-javascript/pull/16897
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/88186ec3ab323c4f185e610a333b73ca391683c8b3badda9c6aa7a9795329771/getsentry/sentry-javascript/pull/16897
og:image:altThis has bugged me often already, and I looked into it again nudged by #16846. Today the logger export from core has a side effect and reads from the global. This is a bit weird... This PR rewrites...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemydea
hostnamegithub.com
expected-hostnamegithub.com
None9a7c5824b75ea2ec5e3de73a483229c7bb9f32a774ffd401f010dd9bacf1483d
turbo-cache-controlno-cache
go-importgithub.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git
octolytics-dimension-user_id1396951
octolytics-dimension-user_logingetsentry
octolytics-dimension-repository_id3328572
octolytics-dimension-repository_nwogetsentry/sentry-javascript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id3328572
octolytics-dimension-repository_network_root_nwogetsentry/sentry-javascript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseb25c3080e84402f75431d8dc7a96b2635219cec7
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-namepull-requests

Links:

Skip to contenthttps://github.com/getsentry/sentry-javascript/pull/16897#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fpull%2F16897
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fpull%2F16897
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=getsentry%2Fsentry-javascript
Reloadhttps://github.com/getsentry/sentry-javascript/pull/16897
Reloadhttps://github.com/getsentry/sentry-javascript/pull/16897
Reloadhttps://github.com/getsentry/sentry-javascript/pull/16897
getsentryhttps://github.com/getsentry
sentry-javascripthttps://github.com/getsentry/sentry-javascript
Codehttps://github.com/getsentry/sentry-javascript
Issues330 (330)https://github.com/getsentry/sentry-javascript/issues
Pull requests58 (58)https://github.com/getsentry/sentry-javascript/pulls
Discussionshttps://github.com/getsentry/sentry-javascript/discussions
Actionshttps://github.com/getsentry/sentry-javascript/actions
Security and quality7 (7)https://github.com/getsentry/sentry-javascript/security
Insightshttps://github.com/getsentry/sentry-javascript/insights
https://github.com/getsentry/sentry-javascript
AbhiPrasadhttps://github.com/AbhiPrasad
develophttps://github.com/getsentry/sentry-javascript/tree/develop
fn/logger-lazyhttps://github.com/getsentry/sentry-javascript/tree/fn/logger-lazy
Conversationhttps://github.com/getsentry/sentry-javascript/pull/16897
Commits1 (1)https://github.com/getsentry/sentry-javascript/pull/16897/commits
Checkshttps://github.com/getsentry/sentry-javascript/pull/16897/checks
Files changedhttps://github.com/getsentry/sentry-javascript/pull/16897/files
ref(core): Rewrite logger to avoid side effectshttps://github.com/getsentry/sentry-javascript/pull/16897#top
AbhiPrasadhttps://github.com/AbhiPrasad
develophttps://github.com/getsentry/sentry-javascript/tree/develop
fn/logger-lazyhttps://github.com/getsentry/sentry-javascript/tree/fn/logger-lazy
https://github.com/mydea
mydeahttps://github.com/mydea
Jul 10, 2025https://github.com/getsentry/sentry-javascript/pull/16897#issue-3219535530
#16846https://github.com/getsentry/sentry-javascript/issues/16846
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/16897
https://github.com/mydea
mydeahttps://github.com/mydea
Jul 10, 2025https://github.com/getsentry/sentry-javascript/pull/16897#event-18567070518
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
Jul 10, 2025https://github.com/getsentry/sentry-javascript/pull/16897#issuecomment-3057665366
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/16897
View base workflow runhttps://github.com/getsentry/sentry-javascript/actions/runs/16197581988
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/16897
https://github.com/AbhiPrasad
AbhiPrasadhttps://github.com/AbhiPrasad
Jul 10, 2025 https://github.com/getsentry/sentry-javascript/pull/16897#pullrequestreview-3006101673
View reviewed changes https://github.com/getsentry/sentry-javascript/pull/16897/files
AbhiPrasadhttps://github.com/AbhiPrasad
https://github.com/getsentry/sentry-javascript/pull/16897#pullrequestreview-3006101673
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/16897
https://github.com/mydea
ref(core): Rewrite logger to avoid side effectshttps://github.com/getsentry/sentry-javascript/pull/16897/commits/c82b4e8d27f011daa3d44417d7c86bc45effc384
c82b4e8https://github.com/getsentry/sentry-javascript/pull/16897/commits/c82b4e8d27f011daa3d44417d7c86bc45effc384
https://github.com/mydea
mydeahttps://github.com/mydea
force-pushedhttps://github.com/getsentry/sentry-javascript/compare/fb47d113ec66f49ef27eb36ee6b9c146e33d71fe..c82b4e8d27f011daa3d44417d7c86bc45effc384
fb47d11https://github.com/getsentry/sentry-javascript/commit/fb47d113ec66f49ef27eb36ee6b9c146e33d71fe
c82b4e8https://github.com/getsentry/sentry-javascript/commit/c82b4e8d27f011daa3d44417d7c86bc45effc384
Compare https://github.com/getsentry/sentry-javascript/compare/fb47d113ec66f49ef27eb36ee6b9c146e33d71fe..c82b4e8d27f011daa3d44417d7c86bc45effc384
July 10, 2025 15:08https://github.com/getsentry/sentry-javascript/pull/16897#event-18568265183
https://github.com/mydea
mydeahttps://github.com/mydea
July 10, 2025 15:09https://github.com/getsentry/sentry-javascript/pull/16897#event-18568266872
https://github.com/apps/cursor
cursorhttps://github.com/apps/cursor
Jul 10, 2025 https://github.com/getsentry/sentry-javascript/pull/16897#pullrequestreview-3006179121
View reviewed changes https://github.com/getsentry/sentry-javascript/pull/16897/files/c82b4e8d27f011daa3d44417d7c86bc45effc384
cursorhttps://github.com/apps/cursor
https://github.com/getsentry/sentry-javascript/pull/16897#pullrequestreview-3006179121
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
sentry-javascript/packages/core/src/utils/logger.tshttps://github.com/getsentry/sentry-javascript/blob/c82b4e8d27f011daa3d44417d7c86bc45effc384/packages/core/src/utils/logger.ts#L128-L135
c82b4e8https://github.com/getsentry/sentry-javascript/commit/c82b4e8d27f011daa3d44417d7c86bc45effc384
sentry-javascript/packages/core/src/utils/logger.tshttps://github.com/getsentry/sentry-javascript/blob/c82b4e8d27f011daa3d44417d7c86bc45effc384/packages/core/src/utils/logger.ts#L76-L87
c82b4e8https://github.com/getsentry/sentry-javascript/commit/c82b4e8d27f011daa3d44417d7c86bc45effc384
Fix in Cursorhttps://cursor.com/open?data=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImJ1Z2JvdC12MSJ9.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9DVVJTT1IiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OjJmYjlhNzlhLTc2ZW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sImlhdCI6MTc1MjE2MDI4MiwiZXhwIjoxNzUyNzY1MDgyfQ.iXzOaHKK6JSb4-ZLArvqS0gcIByXGZloyUUyNsmZ5m_mdJ2PvaUBPujsU7U2X3Xm4M5-2AO31eoF04EVCbaYgIVzKgQwKdzQrhxe8NdyDt2ff5oqH1oyaahJvSt6RvkkVHo0lo1J_N_DaO8RYpcbzF9Z4s4MK92VcUVi1VIFi5jHjieLL1H3oh-R_2E3eveRJQbAaIZiEtjxs7XLKCQ81mkcagYs_zGjRGk6KLuA9DxAiipUK0v5Fv8LBbIhTtYAefbIFScnKUhncmNH_V8SGJNh1MgOzQQkn_tuzIn0KMakMZbg5F1NUfY2aoQrot2g1eBlbXU-6QLJh5K30nbZkQ
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/16897
https://github.com/AbhiPrasad
AbhiPrasadhttps://github.com/AbhiPrasad
Jul 10, 2025 https://github.com/getsentry/sentry-javascript/pull/16897#pullrequestreview-3006208545
View reviewed changes https://github.com/getsentry/sentry-javascript/pull/16897/files/c82b4e8d27f011daa3d44417d7c86bc45effc384
https://github.com/AbhiPrasad
AbhiPrasadhttps://github.com/AbhiPrasad
Jul 10, 2025https://github.com/getsentry/sentry-javascript/pull/16897#issuecomment-3057986420
#16901https://github.com/getsentry/sentry-javascript/issues/16901
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/16897
https://github.com/AbhiPrasad
AbhiPrasadhttps://github.com/AbhiPrasad
fbf7b1chttps://github.com/getsentry/sentry-javascript/commit/fbf7b1c99cd02ea32f90511fb6eb39ed4845bd4b
Jul 10, 2025https://github.com/getsentry/sentry-javascript/pull/16897#event-18568916034
https://github.com/AbhiPrasad
AbhiPrasadhttps://github.com/AbhiPrasad
July 10, 2025 15:42https://github.com/getsentry/sentry-javascript/pull/16897#event-18568916807
https://github.co/hiddenchars
https://github.com/getsentry/sentry-javascript/pull/{{ revealButtonHref }}
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fpull%2F16897
https://github.com/apps/cursor
cursor[bot] https://github.com/apps/cursor
https://github.com/getsentry/sentry-javascript/pull/16897/files/c82b4e8d27f011daa3d44417d7c86bc45effc384
https://github.com/AbhiPrasad
AbhiPrasad https://github.com/AbhiPrasad
https://github.com/getsentry/sentry-javascript/pull/16897/files/c82b4e8d27f011daa3d44417d7c86bc45effc384
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/16897
https://github.com/mydea
mydea https://github.com/mydea
Please reload this pagehttps://github.com/getsentry/sentry-javascript/pull/16897
https://github.com/mydea
https://github.com/AbhiPrasad
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.