We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f6a7809 commit 2643640Copy full SHA for 2643640
src/lerobot/scripts/download.py
@@ -22,10 +22,17 @@
22
MAX_SLEEP_SECONDS = 120
23
DEFAULT_OUTPUT_DIR = "~/.cache/huggingface/lerobot/"
24
25
+# Setup logging with file output
26
+_log_dir = Path("logs/download")
27
+_log_dir.mkdir(parents=True, exist_ok=True)
28
+_file_handler = logging.FileHandler(_log_dir / "download.log")
29
+_file_handler.setFormatter(logging.Formatter("%(asctime)s | %(levelname)s | %(message)s", datefmt="%H:%M:%S"))
30
+
31
logging.basicConfig(
32
level=logging.INFO,
33
format="%(asctime)s | %(levelname)s | %(message)s",
34
datefmt="%H:%M:%S",
35
+ handlers=[logging.StreamHandler(), _file_handler],
36
)
37
LOGGER = logging.getLogger("hub-download")
38
0 commit comments