1
0
mirror of https://github.com/charlienet/go-mixed.git synced 2025-07-17 16:12:42 +08:00

io.Writer

This commit is contained in:
2022-06-27 16:05:37 +08:00
parent dcd803b4f2
commit f061b2efeb
2 changed files with 9 additions and 0 deletions

View File

@ -1,5 +1,7 @@
package logx
import "io"
var std = defaultLogger()
func StandardLogger() Logger {
@ -34,4 +36,5 @@ type Logger interface {
Println(args ...any)
Print(args ...any)
Printf(format string, args ...any)
Writer() io.Writer
}

View File

@ -1,6 +1,8 @@
package logx
import (
"io"
"github.com/sirupsen/logrus"
)
@ -37,3 +39,7 @@ func (l *logrusWrpper) WithFields(fields Fields) Logger {
return l
}
func (l *logrusWrpper) Writer() io.Writer {
return l.Entry.Writer()
}