fix: prevent excessive log file creation on each run#1333
Open
Ricardo-M-L wants to merge 1 commit into
Open
Conversation
Use date-based log filenames instead of second-precision timestamps, so all runs on the same day write to the same file. Add daily rotation and 7-day retention to keep the logs directory clean. Fixes FoundationAgents#1008
Author
|
Friendly bump — this fork PR's workflow run is stuck on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Features
20250329143025.log), causing a large number of blank or small log files to accumulate in thelogs/directory.openmanus_20250329.log) so all runs on the same day append to the same file.Influence
app/logger.py— no changes to any other module.from app.logger import logger) continue to work without modification.define_log_level(name=...)parameter still works: named loggers produce files likemyname_20250329.log.Result
Before: each run creates a new timestamped log file
After: one log file per day, auto-rotated and cleaned up
Other
Removed unused
from datetime import datetimeimport.