mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-11 00:06:04 +00:00
The log filename was computed once at init_logging() startup and the RotatingFileHandler only rotated by size, so a process running across midnight kept appending every subsequent day's logs to the start-day file (langbot-<start date>.log). No file ever appeared for the current day until the process was restarted, confusing users into thinking logging had stopped. Replace RotatingFileHandler with DailyGroupedRotatingFileHandler, which switches to langbot-<current date>.log when the local date changes while still doing size-based numbered rotation within a day. On-disk naming stays compatible with the maintenance log-retention cleanup (LOG_FILE_PATTERN). Adds regression tests.