Documentation
¶
Index ¶
Constants ¶
View Source
const RootName = "sweetbridge"
RootName is the default logger name
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Color bool `yaml:"color"`
TimeFmt string `yaml:"timeFmt"` // one of timeFMT values
Level string `yaml:"level"`
// contains filtered or unexported fields
}
Config represents log config
type Logger ¶
type Logger interface {
// New returns a new Logger that has this logger's context plus the given context
New(ctx ...interface{}) log15.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{})
// Fatal is a Crit log followed by panic
Fatal(msg string, ctx ...interface{})
}
A Logger writes key/value pairs to a Handler
Click to show internal directories.
Click to hide internal directories.