tendermint/p2p/log.go

17 lines
282 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-08-31 01:48:40 -07:00
logging.SetLevel(logging.WARNING, "p2p")
2014-07-09 14:27:32 -07:00
}
2014-08-10 16:35:08 -07:00
func SetP2PLogger(l *logging.Logger) {
2014-07-08 15:33:26 -07:00
log = l
2014-06-29 00:35:16 -07:00
}