You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

30 lines
689 B

package main
import (
"github.com/cihub/seelog"
"github.com/tendermint/tendermint/p2p"
)
var log seelog.LoggerInterface
func init() {
// TODO: replace with configuration file in the ~/.tendermint directory.
config := `
<seelog type="asyncloop" minlevel="debug">
<outputs formatid="colored">
<console/>
</outputs>
<formats>
<format id="main" format="%Date/%Time [%LEV] %Msg%n"/>
<format id="colored" format="%Time %EscM(46)%Level%EscM(49) %EscM(36)%File%EscM(39) %Msg%n%EscM(0)"/>
</formats>
</seelog>`
var err error
log, err = seelog.LoggerFromConfigAsBytes([]byte(config))
if err != nil {
panic(err)
}
p2p.SetLogger(log)
}