Closed elboulangero closed 3 months ago
@jbkempf Is this MR Ok with you? It's pretty trivial but I didn't receive any feedback so far.
I reworded the commit message, trying to make it clearer. If there's something unclear or obviously wrong with this commit, please say. Thanks!
Thanks!
Here's the issue: if ever the LogDir option is modified in the configuration file, sending SIGHUP is not enough to make the change effective, and mirrorbits keep using the old LogDir value. In other words: the LogDir config option is not reloaded on SIGHUP.
How to reproduce: say you have mirrorbits running, and LogDir is commented out. It means mirrorbits doesn't log downloads under the file
$LogDir/downloads.log
. Now, edit the configuration, uncomment LogDir, send SIGHUP to mirrorbits, and observe that it has no effect: there is still no file$LogDir/downloads.log
.I consider it a bug, even though a minor one, just a papercut.
This commit fixes it by always reloading the logs on SIGHUP, thus making sure that, if ever LogDir was modified, the change is taken into account.