Merge pull request #351 from mrd0ll4r/log-output
log: add SetOutput function
This commit is contained in:
commit
44dbf4abb4
1 changed files with 6 additions and 0 deletions
|
@ -4,6 +4,7 @@ package log
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"io"
|
||||||
|
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
@ -23,6 +24,11 @@ func SetFormatter(to logrus.Formatter) {
|
||||||
l.Formatter = to
|
l.Formatter = to
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetOutput sets the output.
|
||||||
|
func SetOutput(to io.Writer) {
|
||||||
|
l.Out = to
|
||||||
|
}
|
||||||
|
|
||||||
// Fields is a map of logging fields.
|
// Fields is a map of logging fields.
|
||||||
type Fields map[string]interface{}
|
type Fields map[string]interface{}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue