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

Use the rich library for logging (alt) #1907

Merged
merged 1 commit into from
Dec 14, 2020
Merged

Conversation

serhiy-storchaka
Copy link
Contributor

Closes #1887.

This attempt uses the hand-made handler instead of RichHandler (as in #1897) and works after closing sys.stderr. The output is closer to the xurrent output, but prefixes like "ERROR: " are output also in no-color mode.

Also fixed logging for CRITICAL errors (it now contains red prefix as for ERROR).

@serhiy-storchaka serhiy-storchaka added the bug Something isn't working label Dec 14, 2020
@codecov
Copy link

codecov bot commented Dec 14, 2020

Codecov Report

Merging #1907 (b7e3b65) into master (b26de62) will decrease coverage by 0.00%.
The diff coverage is 82.85%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1907      +/-   ##
==========================================
- Coverage   86.39%   86.38%   -0.01%     
==========================================
  Files          60       60              
  Lines        9386     9389       +3     
  Branches     1468     1469       +1     
==========================================
+ Hits         8109     8111       +2     
- Misses       1004     1007       +3     
+ Partials      273      271       -2     
Flag Coverage Δ
cli 64.89% <77.14%> (+0.01%) ⬆️
e2e 65.60% <77.14%> (+0.06%) ⬆️
sdk 89.33% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
neuro-cli/src/neuro_cli/main.py 73.75% <70.00%> (+0.14%) ⬆️
neuro-cli/src/neuro_cli/log_formatter.py 89.28% <88.00%> (+6.67%) ⬆️
neuro-cli/src/neuro_cli/asyncio_utils.py 76.82% <0.00%> (-0.67%) ⬇️
neuro-cli/src/neuro_cli/ael.py 49.23% <0.00%> (-0.51%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b26de62...5992cde. Read the comment docs.

Copy link
Contributor

@asvetlov asvetlov left a comment

Choose a reason for hiding this comment

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

LGTM, please merge

@serhiy-storchaka serhiy-storchaka merged commit 9f8b34f into master Dec 14, 2020
@serhiy-storchaka serhiy-storchaka deleted the ss/rich-logging2 branch December 14, 2020 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Debug output of storage cp is full of error messages
2 participants