Azure / Azure/azure-cli

Logs from `handle_version_update` is not shown in `--debug` mdoe

Open
#19,201 1 comment 0 reactions 1 assignee Claimed by @jiasli View on GitHub
act-platform-engineering-squad feature-request Upgrade
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

During the execution of `handle_version_update`, all `logger` invocations are not printed even if `--debug` is specified. This is because `handle_version_update` is called in `AzCli.__init__`, long before the logger is initialized.

This makes the troubleshooting of `handle_version_update` difficult.

Knack previously introduced `init_debug_log` and `init_info_log` to save `__init__` logs (https://github.com/microsoft/knack/pull/209), but an easier solution would be to call `handle_version_update` after the logger is initialized.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.