Skip to content

[chore]: Remove old logger and cleanup logging#6021

Merged
walmat merged 3 commits intodevelopfrom
@matthew/remove-old-logger
Aug 23, 2024
Merged

[chore]: Remove old logger and cleanup logging#6021
walmat merged 3 commits intodevelopfrom
@matthew/remove-old-logger

Conversation

@walmat
Copy link
Copy Markdown
Contributor

@walmat walmat commented Aug 20, 2024

What changed (plus any additional context for devs)

Cleaned up the references to the old deprecated logger in @utils/logger and replaced the calls with @/logger. Also went ahead and added string references to the front of the logs to help us located the file that the log is coming from. This should help us debug quicker where an error is originating from. Along with all this work, I removed several instances in the app that called logger.info which sends a message to Sentry every time it's called and replaced it with logger.debug which is just added as a breadcrumb. This should help clean up events on Sentry that don't really have a purpose to be there.

@walmat walmat requested review from benisgold and brunobar79 August 20, 2024 20:06
@jinchung jinchung self-requested a review August 22, 2024 22:32
Comment thread src/design-system/docs/components/DocsAccordion/index.tsx Outdated
Comment thread src/design-system/docs/next-env.d.ts Outdated
Comment thread src/handlers/ens.ts
Comment thread src/logger/index.ts Outdated
Comment thread src/resources/reservoir/mints.ts Outdated
Comment thread src/model/wallet.ts Outdated
Comment thread package.json
"lint": "yarn format:check && yarn lint:ts && yarn lint:js",
"lint:ci": "yarn format:check && yarn lint:ts && yarn lint:js --quiet",
"lint:js": "eslint --cache .",
"lint:ci": "yarn format:check && yarn lint:ts && yarn lint:js",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

making a note to make sure you want to keep these changes (not sure if it was while you were testing things)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah so the --quiet flag previously wasn't doing anything. Attaching it on the js lint silences warnings (which I prefer and it speeds up linting by a significant amount since the console doesn't have to log 1000+ warnings).

TLDR: This was intentional

Copy link
Copy Markdown
Member

@jinchung jinchung left a comment

Choose a reason for hiding this comment

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

🌮 added a few comments just to make sure things were as intended - none are blockers

@walmat walmat merged commit 3d5a770 into develop Aug 23, 2024
@walmat walmat deleted the @matthew/remove-old-logger branch August 23, 2024 00:58
@sentry
Copy link
Copy Markdown

sentry Bot commented Aug 23, 2024

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ Error: ETH REWARDS CLAIM ERROR <global>(src/logger/index) View Issue
  • ‼️ Error: [wallet]: Error in createWallet _callSuper(src/logger/index) View Issue
  • ‼️ Error: [useInitializeWallet]: Error while initializing wallet _callSuper(src/logger/index) View Issue
  • ‼️ **Error: [consolidatedTransactions]: ** _callSuper(src/logger/index) View Issue
  • ‼️ Error: [useCloudBackups]: Failed to fetch all backups _callSuper(src/logger/index) View Issue

Did you find this useful? React with a 👍 or 👎

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.

2 participants