Spaces:
Building
Building
Delete log.py
Browse files
log.py
DELETED
@@ -1,11 +0,0 @@
|
|
1 |
-
from datetime import datetime
|
2 |
-
|
3 |
-
def log(message):
|
4 |
-
timestamp = datetime.now().strftime("%H:%M:%S")
|
5 |
-
line = f"[{timestamp}] {message}"
|
6 |
-
print(line, flush=True)
|
7 |
-
try:
|
8 |
-
with open("/tmp/logs.txt", "a", encoding="utf-8") as f:
|
9 |
-
f.write(line + "\n")
|
10 |
-
except Exception:
|
11 |
-
pass # dosya erişim hataları sessizce geçilir
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|