Write log also to a file.

This commit is contained in:
Jae Kwon
2015-01-08 17:24:04 -08:00
parent 05c642a84c
commit 51c70dd8ac
11 changed files with 72 additions and 21 deletions

View File

@ -1,19 +1,17 @@
package binary
import (
"os"
"github.com/tendermint/log15"
"github.com/tendermint/tendermint/logger"
)
var log = log15.New("module", "binary")
var log = logger.New("module", "binary")
func init() {
log.SetHandler(
log15.LvlFilterHandler(
log15.LvlWarn,
//log15.LvlDebug,
log15.StreamHandler(os.Stderr, log15.LogfmtFormat()),
logger.RootHandler(),
),
)
}