mirror of
https://git.ari.lt/ari.lt/blog.ari.lt.git
synced 2025-02-04 17:49:24 +01:00
update @ Wed 30 Aug 19:15:36 EEST 2023
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
This commit is contained in:
parent
8bda46d36d
commit
7afdf6baca
1 changed files with 4 additions and 1 deletions
|
@ -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,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue