flare / log.py
ciyidogan's picture
Upload 22 files
cb61e8e verified
raw
history blame
362 Bytes
from datetime import datetime
def log(message):
timestamp = datetime.now().strftime("%H:%M:%S")
line = f"[{timestamp}] {message}"
print(line, flush=True)
try:
with open("/tmp/logs.txt", "a", encoding="utf-8") as f:
f.write(line + "\n")
except Exception:
pass # dosya erişim hataları sessizce geçilir