Change logging system to make it easier to get results from scheduled

task
This commit is contained in:
Kat Inskip 2023-09-08 20:28:09 -07:00
parent fa08d92cf7
commit f3ee0e19ff
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
7 changed files with 26 additions and 15 deletions

View file

@ -1,3 +1,4 @@
import logging
import termcolor
"""
@ -9,4 +10,5 @@ Print a key-value pair with a key and value coloured differently.
:returns: None
"""
def kv_print(key: str, value: str, newline: bool = False) -> None:
logging.info(f"{key}: {value}")
print(termcolor.colored(key, "cyan") + ": " + termcolor.colored(value, "white"), end="\n" if newline else " ")