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

Make colors customizable #242

Merged
merged 2 commits into from
Mar 25, 2021
Merged

Make colors customizable #242

merged 2 commits into from
Mar 25, 2021

Conversation

jiasli
Copy link
Member

@jiasli jiasli commented Mar 18, 2021

Based on #238

Make colors customizable so that the colors defined by Azure CLI can be applied to Knack as well (Azure/azure-cli#17283):

  • preview
  • experimental
  • deprecation
  • critical
  • error
  • warning
  • info
  • debug

msg = self.get_color_wrapper(record.levelno)(msg)
except KeyError:
pass
msg = self.wrap_with_color(record.levelname, msg)
Copy link
Member Author

Choose a reason for hiding this comment

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

We shouldn't ignore KeyError. As KeyError indicates color_map is corrupted.

@jiasli jiasli merged commit 4830dab into microsoft:dev Mar 25, 2021
@jiasli jiasli deleted the color_map branch March 25, 2021 08:34
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