Documentation ¶
Index ¶
- func AsHex(v interface{}) interface{}
- func BodyHook(hook func(e *zerolog.Event, level zerolog.Level, body map[string]interface{})) zerolog.HookFunc
- func ExcludeMessages(messages ...string) zerolog.HookFunc
- func NewConsoleWriter(format string) (io.Writer, error)
- func NewConsoleWriterWith(w io.Writer, format string) (io.Writer, error)
- func NewTendermintLogger(zl zerolog.Logger, level string, trace bool) (log.Logger, error)
- func NewTestLogger(t testing.TB, format, level string, trace bool) log.Logger
- func ParseLogLevel(s string, w io.Writer) (string, io.Writer, error)
- func TestLogWriter(t testing.TB) func(string) (io.Writer, error)
- type FilterWriter
- type Hex
- type OptionalLogger
- type ServiceLogger
- type TendermintZeroLogger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BodyHook ¶
func BodyHook(hook func(e *zerolog.Event, level zerolog.Level, body map[string]interface{})) zerolog.HookFunc
BodyHook is a HORRIBLE HACK, really the hackiest of hacks. It filters zerolog messages based on the log body. DO NOT USE THIS except for tests.
func ExcludeMessages ¶
func NewConsoleWriter ¶
NewConsoleWriter parses the log format and creates an appropriate writer. It is based on part of Tendermint's NewTendermintLogger.
func NewConsoleWriterWith ¶
func NewTendermintLogger ¶
NewTendermintLogger is the default logger implementation for our Tendermint nodes. It is based on part of Tendermint's NewTendermintLogger.
Types ¶
type FilterWriter ¶
type FilterWriter struct { Out io.Writer Predicate func(zerolog.Level, map[string]interface{}) bool }
func (FilterWriter) WriteLevel ¶
type OptionalLogger ¶
func (OptionalLogger) Debug ¶
func (l OptionalLogger) Debug(msg string, keyVals ...interface{})
func (OptionalLogger) Error ¶
func (l OptionalLogger) Error(msg string, keyVals ...interface{})
func (OptionalLogger) Info ¶
func (l OptionalLogger) Info(msg string, keyVals ...interface{})
func (OptionalLogger) With ¶
func (l OptionalLogger) With(keyVals ...interface{}) log.Logger
type ServiceLogger ¶
func NewServiceLogger ¶
func NewServiceLogger(svc service.Service, format string) (*ServiceLogger, error)
func (*ServiceLogger) WriteLevel ¶
type TendermintZeroLogger ¶
TendermintZeroLogger is a Tendermint logger implementation that passes messages to a Zerolog logger. It is basically a complete clone of Tendermint's default logger.
func (*TendermintZeroLogger) Debug ¶
func (l *TendermintZeroLogger) Debug(msg string, keyVals ...interface{})
func (*TendermintZeroLogger) Error ¶
func (l *TendermintZeroLogger) Error(msg string, keyVals ...interface{})
func (*TendermintZeroLogger) Info ¶
func (l *TendermintZeroLogger) Info(msg string, keyVals ...interface{})
func (*TendermintZeroLogger) With ¶
func (l *TendermintZeroLogger) With(keyVals ...interface{}) log.Logger
Click to show internal directories.
Click to hide internal directories.