mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2024-11-12 18:12:41 +00:00
21 lines
355 B
Go
21 lines
355 B
Go
package database
|
|
|
|
import (
|
|
"fmt"
|
|
"io"
|
|
|
|
"github.com/sirupsen/logrus"
|
|
)
|
|
|
|
type (
|
|
logWriter struct{ io.Writer }
|
|
)
|
|
|
|
func newLogrusLogWriterWithLevel(level logrus.Level) logWriter {
|
|
writer := logrus.StandardLogger().WriterLevel(level)
|
|
return logWriter{writer}
|
|
}
|
|
|
|
func (l logWriter) Printf(format string, a ...any) {
|
|
fmt.Fprintf(l.Writer, format, a...)
|
|
}
|