mirror of
https://github.com/wassname/ray.git
synced 2026-06-28 07:02:22 +08:00
be26532182
* get_log_file_path instead of LOG_DIRECTORY * Tabs -> spaces Whoops * Log file extension
10 lines
301 B
Python
10 lines
301 B
Python
import datetime
|
|
import os.path
|
|
import sys
|
|
import tempfile
|
|
|
|
def get_log_file_path(name):
|
|
return os.path.join(
|
|
os.path.join("/tmp" if sys.platform.startswith("darwin") else tempfile.gettempdir(), "raylogs"),
|
|
("{:%Y-%m-%d-%H-%M-%S}-{}").format(datetime.datetime.now(), name.replace(":", "-")))
|