Documentation
¶
Overview ¶
Package logutil defines the Logger interface expected by indexer implementations. It is implemented by cosmossdk.io/log which is not imported to minimize dependencies.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger interface {
// Info takes a message and a set of key/value pairs and logs with level INFO.
// The key of the tuple must be a string.
Info(msg string, keyVals ...interface{})
// Warn takes a message and a set of key/value pairs and logs with level WARN.
// The key of the tuple must be a string.
Warn(msg string, keyVals ...interface{})
// Error takes a message and a set of key/value pairs and logs with level ERR.
// The key of the tuple must be a string.
Error(msg string, keyVals ...interface{})
// Debug takes a message and a set of key/value pairs and logs with level DEBUG.
// The key of the tuple must be a string.
Debug(msg string, keyVals ...interface{})
}
Logger is the logger interface expected by indexer implementations.
type NoopLogger ¶
type NoopLogger struct{}
NoopLogger is a logger that doesn't do anything.
func (NoopLogger) Debug ¶
func (n NoopLogger) Debug(string, ...interface{})
func (NoopLogger) Error ¶
func (n NoopLogger) Error(string, ...interface{})
func (NoopLogger) Info ¶
func (n NoopLogger) Info(string, ...interface{})
func (NoopLogger) Warn ¶
func (n NoopLogger) Warn(string, ...interface{})
type ScopeableLogger ¶ added in v0.4.0
type ScopeableLogger interface {
// WithContext returns a new logger with the provided key/value pairs set.
WithContext(keyVals ...interface{}) interface{}
}
ScopeableLogger is a logger that can be scoped with key/value pairs. It is implemented by all the loggers in cosmossdk.io/log.
Click to show internal directories.
Click to hide internal directories.