mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-18 14:47:03 +00:00
Reopen logs on SIGHUP
This makes it possible to manage chasquid logs using logrotate. Amended-by: Alberto Bertogli <albertito@blitiri.com.ar> Added tests, minor style and comment changes.
This commit is contained in:
committed by
Alberto Bertogli
parent
ade107f62e
commit
db810084a0
@@ -81,6 +81,11 @@ func (l *Logger) printf(format string, args ...interface{}) {
|
||||
}
|
||||
}
|
||||
|
||||
// Reopen the underlying logger.
|
||||
func (l *Logger) Reopen() error {
|
||||
return l.inner.Reopen()
|
||||
}
|
||||
|
||||
// Listening logs that the daemon is listening on the given address.
|
||||
func (l *Logger) Listening(a string) {
|
||||
l.printf("daemon listening on %s\n", a)
|
||||
|
||||
Reference in New Issue
Block a user