update @ Wed 30 Aug 19:15:36 EEST 2023

Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
This commit is contained in:
Ari Archer 2023-08-30 19:15:36 +03:00
parent 8bda46d36d
commit 7afdf6baca
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: A50D5B4B599AF8A2

View file

@ -145,6 +145,7 @@ DEFAULT_CONFIG: typing.Dict[str, typing.Any] = {
} }
NCI: bool = "CI" not in os.environ NCI: bool = "CI" not in os.environ
NOCLR: bool = "NOCLR" in os.environ
LOG_CLR: str = "\033[90m" LOG_CLR: str = "\033[90m"
ERR_CLR: str = "\033[1m\033[31m" ERR_CLR: str = "\033[1m\033[31m"
@ -346,7 +347,9 @@ def ctimer() -> float:
def log(msg: str, clr: str = LOG_CLR) -> int: def log(msg: str, clr: str = LOG_CLR) -> int:
if NCI: if NCI:
print( print(
f"{clr}{datetime.datetime.now()} | {msg}\033[0m", f"{datetime.datetime.now()} | {msg}"
if NOCLR
else f"{clr}{datetime.datetime.now()} | {msg}\033[0m",
file=sys.stderr, file=sys.stderr,
) )