dnscrypt-proxy icon indicating copy to clipboard operation
dnscrypt-proxy copied to clipboard

Close & re-open log files on (say) SIGUSR1 ?

Open georgep56 opened this issue 8 years ago • 1 comments

Some systems (I'm using dnscrypt-proxy on FreeBSD atm) allow log file rotation using functionality such as 'newsyslog'.

Newsyslog provides the ability to send a configured signal such as SIGUSR1 to a program to tell it to close and re-open its logfile as part of the log trimming/rotating process. Failure to do this just leaves the program writing to the original file.

Could this functionality be implemented in dnscrypt-proxy? It would allow a more 'standard' log-trimming process to be implemented rather than the inbuilt log-pruning option that I have just seen in another request.

I'm pretty sure that dnsmasq already implements this feature :-)

georgep56 avatar Feb 27 '18 11:02 georgep56

lumberjack seems to support both built-in rotation and SIGUSR1.

So, probably something we can use.

jedisct1 avatar Feb 27 '18 13:02 jedisct1