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

Chore(2523): Improve logging, primarily on desktop #2518

Merged
merged 15 commits into from May 15, 2024

Conversation

ikoenigsknecht
Copy link
Collaborator

  • Adds a new QuietLogger class with improved formatting and colorization
  • Use new logger in state-manager
  • Use new logger in backend
  • Use new logger in desktop (partial)

Pull Request Checklist

  • I have linked this PR to a related GitHub issue.
  • I have added a description of the change (and Github issue number, if any) to the root CHANGELOG.md.

(Optional) Mobile checklist

Please ensure you completed the following checks if you did any changes to the mobile package:

  • I have run e2e tests for mobile
  • I have updated base screenshots for visual regression tests

@ikoenigsknecht ikoenigsknecht marked this pull request as ready for review May 10, 2024 21:19
@ikoenigsknecht ikoenigsknecht changed the title Improve logging, primarily on desktop Chore(2523): Improve logging, primarily on desktop May 13, 2024
@ikoenigsknecht
Copy link
Collaborator Author

Resolves #2523

Copy link
Collaborator

@adrastaea adrastaea left a comment

Choose a reason for hiding this comment

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

I would prefer to see the rest of our console.log statements brought into the new paradigm and for clarity on my comments before we merge just so that we don't end up accidentally walking down the multiple logging standards path longer than we'd like.

packages/logger/src/index.ts Outdated Show resolved Hide resolved
packages/logger/src/index.ts Show resolved Hide resolved
@@ -0,0 +1,20 @@
import { shouldPolyfill as shouldPolyfillCanon } from '@formatjs/intl-getcanonicallocales/should-polyfill'
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not sure if this is the best place for this polyfill. I wanted it to be in mobile since its specific to mobile but the mobile code wasn't being run soon enough, it seems, to run before the logging started.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I also added some doc strings to the this file for clarity.

@ikoenigsknecht ikoenigsknecht merged commit 51c9648 into develop May 15, 2024
28 of 32 checks passed
@ikoenigsknecht ikoenigsknecht deleted the logging-improvements branch May 15, 2024 23: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.

None yet

2 participants