feat(GODT-2691): close logrus output file on exit.

This commit is contained in:
Xavier Michelon
2023-06-28 13:34:19 +02:00
parent c267168cb7
commit 7b7c9093ce
5 changed files with 52 additions and 8 deletions

View File

@ -86,6 +86,14 @@ func (r *Rotator) Write(p []byte) (int, error) {
return n, nil
}
func (r *Rotator) Close() error {
if r.wc != nil {
return r.wc.Close()
}
return nil
}
func (r *Rotator) rotate() error {
if r.wc != nil {
_ = r.wc.Close()