forked from Mirror/pmbootstrap
helpers: logging: add templates for colors (MR 2252)
Let's make pmbootstrap more colourful! Add some templates to enable arbitrary colors in log messages. Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
parent
b860b3efbe
commit
6db7e81a56
1 changed files with 20 additions and 0 deletions
|
@ -67,6 +67,26 @@ class log_handler(logging.StreamHandler):
|
|||
f"{styles['GREEN']}*** ",
|
||||
1,
|
||||
)
|
||||
.replace(
|
||||
"@BLUE@",
|
||||
f"{styles['BLUE']}",
|
||||
)
|
||||
.replace(
|
||||
"@YELLOW@",
|
||||
f"{styles['YELLOW']}",
|
||||
)
|
||||
.replace(
|
||||
"@RED@",
|
||||
f"{styles['RED']}",
|
||||
)
|
||||
.replace(
|
||||
"@GREEN@",
|
||||
f"{styles['GREEN']}",
|
||||
)
|
||||
.replace(
|
||||
"@END@",
|
||||
f"{styles['END']}",
|
||||
)
|
||||
)
|
||||
|
||||
msg_col += styles["END"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue