mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-28 22:08:01 +08:00
feat(eventlog) initialize event logger with silent defaults
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
This commit is contained in:
parent
bacf3ecc6a
commit
aba4b2bde4
@ -2,11 +2,20 @@ package eventlog
|
||||
|
||||
import (
|
||||
"io"
|
||||
"os"
|
||||
|
||||
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/maybebtc/logrus"
|
||||
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/gopkg.in/natefinch/lumberjack.v2"
|
||||
)
|
||||
|
||||
func init() {
|
||||
Configure(TextFormatter)
|
||||
Configure(Output(os.Stderr))
|
||||
// has the effect of disabling logging since we log event entries at Info
|
||||
// level by convention
|
||||
Configure(LevelError)
|
||||
}
|
||||
|
||||
type Option func()
|
||||
|
||||
func Configure(options ...Option) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user