feat(eventlog) initialize event logger with silent defaults
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committed
Nov 16, 2014 at 13:14 UTC
aba4b2bde471435df05bab22e6f7c95bb382e1f1
1 file changed
+9
util/eventlog/option.go
+9
@@ -2,11 +2,20 @@ package eventlog
2
3
import (
4
"io"
5
+ "os"
6
7
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/maybebtc/logrus"
8
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/gopkg.in/natefinch/lumberjack.v2"
9
)
10
11
+func init() {
12
+ Configure(TextFormatter)
13
+ Configure(Output(os.Stderr))
14
+ // has the effect of disabling logging since we log event entries at Info
15
+ // level by convention
16
+ Configure(LevelError)
17
+}
18
+
19
type Option func()
20
21
func Configure(options ...Option) {