mirror of
https://github.com/sigoden/dufs.git
synced 2026-04-08 16:49:02 +03:00
[GH-ISSUE #582] Handle log file rotation, for example on SIGHUP #343
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @g-v-egidy on GitHub (May 11, 2025).
Original GitHub issue: https://github.com/sigoden/dufs/issues/582
Specific Demand
When dufs is running for a longer time you may want to rotate it's logfile. Optimally without interrupting service. There should either be a way to notify dufs about the logfile rotation or it should find out itself automatically.
Implement Suggestion
It is very common for daemons to reopen the logfile on receiving a SIGHUP signal.
Another way would be to stat the log filename before logging each entry and comparing it with the inode of the opened logfile to detect a change.
But there are probably other ways for detecting log file rotation too.
@sigoden commented on GitHub (May 12, 2025):
dufs is just a simple file server, and we don't think it's necessary to support such complex logging features.