mirror of
https://github.com/kittywitch/konawall-py.git
synced 2026-02-09 12:29:19 -08:00
Change logging system to make it easier to get results from scheduled
task
This commit is contained in:
parent
fa08d92cf7
commit
f3ee0e19ff
7 changed files with 26 additions and 15 deletions
|
|
@ -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 " ")
|
||||
Loading…
Add table
Add a link
Reference in a new issue