Skip to content

Commit 9b072f7

Browse files
committed
chore(cli): show log path in STDIO when log level is set.
1 parent 1d1a28d commit 9b072f7

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/vectorcode/cli_utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import argparse
2+
import atexit
23
import glob
34
import json
45
import logging
@@ -523,6 +524,8 @@ def config_logging(
523524
file_handler = logging.FileHandler(log_file_path)
524525
file_handler.setLevel(level or logging.WARN)
525526
handlers.append(file_handler)
527+
if stdio:
528+
atexit.register(lambda: print(f"Saving log to {log_file_path}."))
526529

527530
if stdio:
528531
import colorlog

0 commit comments

Comments
 (0)