tendermint/peer/log.go

28 lines
622 B
Go
Raw Normal View History

2014-06-07 19:09:47 -07:00
package peer
import (
2014-07-01 14:50:24 -07:00
"github.com/cihub/seelog"
2014-06-07 19:09:47 -07:00
)
2014-06-29 00:35:16 -07:00
var log seelog.LoggerInterface
func init() {
2014-07-01 14:50:24 -07:00
// TODO: replace with configuration file in the ~/.tendermint directory.
config := `
<seelog type="asyncloop" minlevel="debug">
2014-06-29 00:35:16 -07:00
<outputs formatid="colored">
<console/>
</outputs>
<formats>
<format id="main" format="%Date/%Time [%LEV] %Msg%n"/>
<format id="colored" format="%EscM(46)%Level%EscM(49) %EscM(36)%File%EscM(39) %Msg%n%EscM(0)"/>
</formats>
</seelog>`
2014-07-01 14:50:24 -07:00
var err error
log, err = seelog.LoggerFromConfigAsBytes([]byte(config))
if err != nil {
panic(err)
}
2014-06-29 00:35:16 -07:00
}