This commit is contained in:
Mikan
2025-06-02 14:16:03 +03:00
commit 83cfcd9fb1
19 changed files with 430 additions and 0 deletions

13
ReactDev/utils/logger.py Normal file
View File

@@ -0,0 +1,13 @@
import sys
def log(message: str, level: str = "info"):
"""
Логирует сообщения в консоль.
"""
levels = {
"info": "[INFO]",
"warning": "[WARNING]",
"error": "[ERROR]",
}
prefix = levels.get(level, "[UNKNOWN]")
print(f"{prefix} {message}", file=sys.stderr if level == "error" else sys.stdout)