You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the timestamp is added to the active logger and not just when changing log files. logrotate only appends the timestamp when rotating the file such that the active file is always the same. This behavior is sometimes useful and I think it would be good to support that there too. It is very easy to implement, but I am just not sure what the API should be. Perhaps just a filename and a prefix as two arguments?
The text was updated successfully, but these errors were encountered:
oxinabox
changed the title
Filename of active logfile in DatetimeRotatingFilelogger
Always same filename of active logfile in DatetimeRotatingFilelogger, until rotated out
Sep 21, 2021
Would that be a better option than the current way?
It would be nice to avoid having configurable options, and have one consistent way it always worked.
I am just not sure what the API should be. Perhaps just a filename and a prefix as two arguments?
It would be nice to keep the current API, where you pass a DateFormat, I think.
I feel like a we could derive a simple filename from the DateFormat.
Which is a reasonable format of access-y21-09.log which even the last will reduce to access-ym.log.
But maybe something more complex could do it?
Or maybe something simplete, of just keeping first and last Delim ?
Would that be a better option than the current way?
The motivation for this issue is tools that monitor a log file. I worked around this issue by just using the rotation_callback function to create a symlink. I can post the workaround when I have access to that computer again. Might be simple enough to do it like that.
Currently the timestamp is added to the active logger and not just when changing log files.
logrotate
only appends the timestamp when rotating the file such that the active file is always the same. This behavior is sometimes useful and I think it would be good to support that there too. It is very easy to implement, but I am just not sure what the API should be. Perhaps just a filename and a prefix as two arguments?The text was updated successfully, but these errors were encountered: