1
0
Fork 0
logging/rotater/iface.go

25 lines
462 B
Go
Raw Permalink Normal View History

2022-03-18 09:21:04 +09:00
package rotater
import (
rotatelogs "github.com/lestrrat-go/file-rotatelogs"
"io"
)
type (
// WriteSyncer is a WriteCloser interface with synchronize capability.
WriteSyncer interface {
io.WriteCloser
Sync() error
}
// RotateSyncer is a WriteSyncer interface with file rotate capability.
RotateSyncer interface {
WriteSyncer
SetOnClose(func())
Rotate() error
}
// Option is an alias for the rotatelogs.Option
Option = rotatelogs.Option
)