Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBaseLogger ¶
NewTMFmtLogger returns a logger that encodes keyvals to the Writer in CometBFT custom format. Note complex types (structs, maps, slices) formatted as "%+v".
Each log event produces no more than one call to w.Write. The passed Writer must be safe for concurrent use by multiple goroutines if the returned Logger will be used concurrently.
func NewSyncWriter ¶
NewSyncWriter returns a new writer that is safe for concurrent use by multiple goroutines. Writes to the returned writer are passed on to w. If another write is already in progress, the calling goroutine blocks until the writer is available.
If w implements the following interface, so does the returned writer.
interface { Fd() uintptr }
Types ¶
type Logger ¶
type Logger interface { Debug(msg string, keyvals ...interface{}) Info(msg string, keyvals ...interface{}) Error(msg string, keyvals ...interface{}) With(keyvals ...interface{}) Logger }
func NewSRLogger ¶
NewTMLogger returns a logger that encodes msg and keyvals to the Writer using go-kit's log as an underlying logger and our custom formatter. Note that underlying logger could be swapped with something else.