Build bold palette automatically

kivy_mainline_and_py3.8
Tyler Goodlet 2018-01-22 21:59:16 -05:00
parent 570d879146
commit c7258f3fb2
1 changed files with 4 additions and 10 deletions

View File

@ -1,6 +1,6 @@
"""
Log like a forester!
(HINT: You can't usually find stupid suits in the forest)
(You can't usually find stupid suits in the forest)
"""
import sys
import logging
@ -8,7 +8,6 @@ import colorlog
_proj_name = 'piker'
# Super sexy formatting thanks to ``colorlog``.
# (NOTE: we use the '{' format style)
# Here, `thin_white` is just the laymen's gray.
@ -29,22 +28,17 @@ LEVELS = {
'QUIET': 1000,
}
STD_PALETTE = {
'CRITICAL': 'bold_red',
'CRITICAL': 'red',
'ERROR': 'red',
'WARNING': 'yellow',
'INFO': 'green',
'DEBUG': 'purple',
'TRACE': 'cyan',
'GARBAGE': 'blue',
}
BOLD_PALETTE = {
'bold': {
'CRITICAL': 'bold_red',
'ERROR': 'bold_red',
'WARNING': 'bold_yellow',
'INFO': 'bold_green',
'DEBUG': 'bold_purple',
'TRACE': 'bold_cyan',
},
level: f"bold_{color}" for level, color in STD_PALETTE.items()}
}