github.com/tendermint/tmlibs@v0.9.0/log/tm_json_logger.go (about)

     1  package log
     2  
     3  import (
     4  	"io"
     5  
     6  	kitlog "github.com/go-kit/kit/log"
     7  )
     8  
     9  // NewTMJSONLogger returns a Logger that encodes keyvals to the Writer as a
    10  // single JSON object. Each log event produces no more than one call to
    11  // w.Write. The passed Writer must be safe for concurrent use by multiple
    12  // goroutines if the returned Logger will be used concurrently.
    13  func NewTMJSONLogger(w io.Writer) Logger {
    14  	return &tmLogger{kitlog.NewJSONLogger(w)}
    15  }