func OutputRotatingLogFile(config LogRotatorConfig) Option { return func() { logrus.SetOutput( &lumberjack.Logger{ Filename: config.Filename, MaxSize: int(config.MaxSizeMB), MaxBackups: int(config.MaxBackups), MaxAge: int(config.MaxAgeDays), }) } }
func Output(w io.Writer) Option { return func() { logrus.SetOutput(w) // TODO return previous Output option } }