-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Open
Description
Context
There could be a method to turn on DEBUG log for all commands, like turning on DEBUG log for all PowerShell cmdlets through
$DebugPreference = "Continue"Currently, CLI can enable log file with logging.enable_log_file (https://docs.microsoft.com/en-us/cli/azure/azure-cli-configuration) which prints all levels of logs.
Proposals
Add core.debug config option
A config option core.debug can be added, like core.only_show_error. However, there will still be no option to always show INFO logs.
Add core.log_level config option and --log-level argument
Like log_cli_level from pytest (https://docs.pytest.org/en/6.2.x/logging.html#live-logs), a more general solution is to add core.log_level config option and --log-level argument which can be set to
debuginfowarningerror
This is a superset of
core.only_show_errors/--only-show-errors(Support --only-show-errors microsoft/knack#179), which is equivalent tocore.log_level=error/--log-level error--debug, which is equivalent tocore.log_level=debug/--log-level debug--verbose, which is equivalent tocore.log_level=info/--log-level info
References
Reactions are currently unavailable