microsoft / react-native-windows

A framework for building native Windows apps with React.
https://microsoft.github.io/react-native-windows/
Other
16.28k stars 1.14k forks source link

Consolidate CLI Logging/Verbosity Handling #9516

Open NickGerleman opened 2 years ago

NickGerleman commented 2 years ago

There's a CLI architecture issue that intersects with this issue. We do not have a centralized logger. This makes respecting verbosity requirements ad-hoc, on the implementor. E.g. there are lots of adhoc options.verbose, isVerbose, logVerboseExitCode(), etc.

We should ideally instead have something like logger.brief(), logger.warning(), logger.error(), and use eslint to ban console.log, console.error, etc. To enforce verbosity is consistent and causing less flow-control complexity.

Originally posted by @NickGerleman in https://github.com/microsoft/react-native-windows/issues/9515#issuecomment-1034677274

jonthysell commented 2 years ago

Seems like a nice to have, but we'll have to make sure it's something that makes sense for both @react-native-windows/cli, and react-native-windows-init