mirror of
https://github.com/morgan9e/bitwarden-desktop-agent
synced 2026-04-14 00:04:06 +09:00
26 lines
426 B
Python
26 lines
426 B
Python
import sys
|
|
import time
|
|
|
|
_start = time.monotonic()
|
|
|
|
|
|
def _ts() -> str:
|
|
return f"{time.monotonic() - _start:8.3f}"
|
|
|
|
|
|
def info(msg: str):
|
|
print(f"[{_ts()}] {msg}", file=sys.stderr, flush=True)
|
|
|
|
|
|
def warn(msg: str):
|
|
print(f"[{_ts()}] WARN {msg}", file=sys.stderr, flush=True)
|
|
|
|
|
|
def error(msg: str):
|
|
print(f"[{_ts()}] ERROR {msg}", file=sys.stderr, flush=True)
|
|
|
|
|
|
def fatal(msg: str):
|
|
error(msg)
|
|
sys.exit(1)
|