tendermint/p2p/log.go

16 lines
237 B
Go
Raw Normal View History

2014-07-07 20:03:50 -07:00
package p2p
2014-06-07 19:09:47 -07:00
import (
2014-07-14 16:15:13 -07:00
"github.com/op/go-logging"
2014-06-07 19:09:47 -07:00
)
2014-07-14 16:15:13 -07:00
var log = logging.MustGetLogger("p2p")
2014-06-29 00:35:16 -07:00
2014-07-09 14:27:32 -07:00
func init() {
2014-07-14 16:15:13 -07:00
logging.SetFormatter(logging.MustStringFormatter("[%{level:.1s}] %{message}"))
2014-07-09 14:27:32 -07:00
}
2014-07-14 16:15:13 -07:00
func SetLogger(l *logging.Logger) {
2014-07-08 15:33:26 -07:00
log = l
2014-06-29 00:35:16 -07:00
}