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

refactor: cli logger #2729

Merged

Conversation

crherman7
Copy link
Contributor

@crherman7 crherman7 commented Jul 30, 2024

Describe your changes

CLI log levels + status.

Type of change

  • New feature (non-breaking change which adds functionality)

Test Plan

  • yarn test
  • yarn flagship-code prebuild --build internal --env prod
  • Verify only info log messages
  • yarn flagship-code prebuild --build internal --env prod --log-level log
  • Verify info + log messages
  • yarn flagship-code prebuild --build internal --env prod --log-level debug
  • Verify info + log + debug messages
info
Screen.Recording.2024-08-07.at.9.54.17.AM.mov
log
Screen.Recording.2024-08-07.at.9.55.24.AM.mov
debug
Screen.Recording.2024-08-07.at.9.56.05.AM.mov

Checklist before requesting a review

  • A self-review of my code has been completed
  • Tests have been added / updated if required
  • Documentation has been updated to reflect these changes

Notes

  • Documentation will come with an additional PR

@crherman7 crherman7 marked this pull request as draft July 30, 2024 19:50
packages/cli/src/lib/FlagshipCodeLogger.ts Outdated Show resolved Hide resolved
packages/cli/src/lib/FlagshipCodeLogger.ts Outdated Show resolved Hide resolved
packages/cli/src/lib/FlagshipCodeManager.ts Outdated Show resolved Hide resolved
packages/cli/src/lib/constants.ts Show resolved Hide resolved
packages/cli/src/lib/guards.ts Show resolved Hide resolved
@crherman7 crherman7 changed the base branch from develop to feature/RN73 August 6, 2024 19:18
packages/cli/src/actions/plugins.ts Outdated Show resolved Hide resolved
packages/cli/src/actions/template.ts Outdated Show resolved Hide resolved
packages/cli/src/actions/transformers.ts Outdated Show resolved Hide resolved
packages/cli/src/components/ProgressBar.tsx Outdated Show resolved Hide resolved
@crherman7 crherman7 marked this pull request as ready for review August 7, 2024 13:57
@@ -1,10 +1,14 @@
import chalk from 'chalk';
Copy link
Contributor

Choose a reason for hiding this comment

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

chalk is unused

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch

'-l --log-level [logLevel]',
'debug, log, info, warn, error log levels.',
)
.choices(['debug', 'log', 'info', 'warn', 'error'])
Copy link
Contributor

Choose a reason for hiding this comment

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

if you set log level to warn or error you no longer get the relevant output flagship-code align-deps -p "0.72" -l warn, seems odd to be able to remove the functionality with a log level, not sure if we need it for this command.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok - I will remove it from that command

@NickBurkhartBB NickBurkhartBB merged commit 1f2079d into brandingbrand:feature/RN73 Aug 8, 2024
1 check passed
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