Skip to content

Commit c5f8b17

Browse files
authored
Merge pull request #769 from U-C4N/main
2 parents cf62c4f + 170152c commit c5f8b17

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/logging.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@
1212
from constants import LOG_TO_CONSOLE, LOG_TO_FILE, MINIMUM_LOG_LEVEL
1313
selenium_logger.setLevel(LOG_CONFIG[MINIMUM_LOG_LEVEL])
1414

15-
log_file = "log/app.log"
15+
def get_log_filename():
16+
timestamp = time.strftime("%Y%m%d_%H%M%S")
17+
return f"log/app_{timestamp}.log"
18+
19+
log_file = get_log_filename()
1620

1721
# Ensure the log directory exists
1822
os.makedirs(os.path.dirname(log_file), exist_ok=True)

0 commit comments

Comments
 (0)