Documentation ¶
Index ¶
- func BodyHook(hook func(e *zerolog.Event, level zerolog.Level, body map[string]interface{})) zerolog.HookFunc
- func ExcludeMessages(messages ...string) zerolog.HookFunc
- func GetCurrentDateTime() (ymd string, hm string)
- 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 TB, format, level string, trace bool) log.Logger
- func ParseLogLevel(s string, w io.Writer) (string, io.Writer, error)
- func TestLogWriter(t TB) func(string) (io.Writer, error)
- type DataSet
- type DataSetLog
- func (d *DataSetLog) DumpDataSetToDiskFile() ([]string, error)
- func (d *DataSetLog) GetDataSet(id string) *DataSet
- func (d *DataSetLog) Initialize(key string, opts Options)
- func (d *DataSetLog) SetFileTag(parts ...string)
- func (d *DataSetLog) SetHeader(header string)
- func (d *DataSetLog) SetPath(path string)
- func (d *DataSetLog) SetProcessName(process string)
- type FilterWriter
- type LogAsHex
- type LogAsHexSlice
- type LogAsHexValue
- type LogWithFormat
- type NullLogger
- type OptionalLogger
- type Options
- type ServiceLogger
- type TB
- 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 GetCurrentDateTime ¶ added in v1.0.0
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 DataSet ¶ added in v1.0.0
type DataSet struct {
// contains filtered or unexported fields
}
type DataSetLog ¶ added in v1.0.0
type DataSetLog struct {
// contains filtered or unexported fields
}
func (*DataSetLog) DumpDataSetToDiskFile ¶ added in v1.0.0
func (d *DataSetLog) DumpDataSetToDiskFile() ([]string, error)
func (*DataSetLog) GetDataSet ¶ added in v1.0.0
func (d *DataSetLog) GetDataSet(id string) *DataSet
func (*DataSetLog) Initialize ¶ added in v1.0.0
func (d *DataSetLog) Initialize(key string, opts Options)
func (*DataSetLog) SetFileTag ¶ added in v1.0.0
func (d *DataSetLog) SetFileTag(parts ...string)
func (*DataSetLog) SetHeader ¶ added in v1.0.0
func (d *DataSetLog) SetHeader(header string)
func (*DataSetLog) SetPath ¶ added in v1.0.0
func (d *DataSetLog) SetPath(path string)
func (*DataSetLog) SetProcessName ¶ added in v1.0.0
func (d *DataSetLog) SetProcessName(process string)
type FilterWriter ¶
type FilterWriter struct { Out io.Writer Predicate func(zerolog.Level, map[string]interface{}) bool }
func (FilterWriter) WriteLevel ¶
type LogAsHexSlice ¶ added in v0.5.1
type LogAsHexSlice []LogAsHex
func (LogAsHexSlice) Slice ¶ added in v0.5.1
func (v LogAsHexSlice) Slice(i, j int) LogAsHex
type LogAsHexValue ¶ added in v0.5.1
type LogAsHexValue []byte
func (LogAsHexValue) MarshalJSON ¶ added in v0.5.1
func (v LogAsHexValue) MarshalJSON() ([]byte, error)
func (LogAsHexValue) Slice ¶ added in v0.5.1
func (v LogAsHexValue) Slice(i, j int) LogAsHex
type LogWithFormat ¶ added in v0.6.0
type LogWithFormat struct { Format string Values []interface{} }
func WithFormat ¶ added in v0.6.0
func WithFormat(format string, values ...interface{}) LogWithFormat
func (LogWithFormat) MarshalJSON ¶ added in v0.6.0
func (v LogWithFormat) MarshalJSON() ([]byte, error)
type NullLogger ¶ added in v0.5.1
type NullLogger struct{}
func (NullLogger) Debug ¶ added in v0.5.1
func (NullLogger) Debug(msg string, keyVals ...interface{})
func (NullLogger) Error ¶ added in v0.5.1
func (NullLogger) Error(msg string, keyVals ...interface{})
func (NullLogger) Info ¶ added in v0.5.1
func (NullLogger) Info(msg string, keyVals ...interface{})
func (NullLogger) With ¶ added in v0.5.1
func (l NullLogger) With(keyVals ...interface{}) log.Logger
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 Options ¶ added in v1.0.0
func DefaultOptions ¶ added in v1.0.0
func DefaultOptions() Options
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.