Documentation
¶
Index ¶
- func Crit(msg string, ctx ...interface{})
- func Critf(msg string, ctx ...interface{})
- func Debug(msg string, ctx ...interface{})
- func Debugf(msg string, ctx ...interface{})
- func Error(msg string, ctx ...interface{})
- func Errorf(msg string, ctx ...interface{})
- func Info(msg string, ctx ...interface{})
- func Infof(msg string, ctx ...interface{})
- func Init(nodeConfig conf.NodeConfig, config conf.LoggerConfig)
- func InitMobileLogger(filepath string, isDebug bool)
- func Trace(msg string, ctx ...interface{})
- func Tracef(msg string, ctx ...interface{})
- func Warn(msg string, ctx ...interface{})
- func Warnf(msg string, ctx ...interface{})
- type Ctx
- type Logger
- type Lvl
- type TerminalStringer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Debug ¶
func Debug(msg string, ctx ...interface{})
Debug is a convenient alias for Root().Debug
func Error ¶
func Error(msg string, ctx ...interface{})
Error is a convenient alias for Root().Error
func Errorf ¶
func Errorf(msg string, ctx ...interface{})
Errorf is a convenient alias for Root().Error
func Init ¶
func Init(nodeConfig conf.NodeConfig, config conf.LoggerConfig)
func InitMobileLogger ¶
Types ¶
type Ctx ¶
type Ctx map[string]interface{}
Ctx is a map of key/value pairs to pass as context to a log function Use this only if you really need greater safety around the arguments you pass to the logging functions.
type Logger ¶
type Logger interface {
// New returns a new Logger that has this logger's context plus the given context
New(ctx ...interface{}) Logger
// Log a message at the given level with context key/value pairs
Trace(msg string, ctx ...interface{})
Debug(msg string, ctx ...interface{})
Info(msg string, ctx ...interface{})
Warn(msg string, ctx ...interface{})
Error(msg string, ctx ...interface{})
Crit(msg string, ctx ...interface{})
}
A Logger writes key/value pairs to a Handler
type TerminalStringer ¶
type TerminalStringer interface {
TerminalString() string
}
TerminalStringer is an analogous interface to the stdlib stringer, allowing own types to have custom shortened serialization formats when printed to the screen.