Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Context is simplified version of go-kit log Context https://godoc.org/github.com/go-kit/kit/log#Context.
func NewContext ¶
NewContext returns a logger that adds prefix before keyvals.
func (*Context) WithPrefix ¶
WithPrefix returns a new Context with keyvals prepended to those of the receiver.
type Logger ¶
type Logger interface {
Log(keyvals ...interface{}) error
}
Logger is the fundamental interface for all log operations. Log creates a log event from keyvals, a variadic sequence of alternating keys and values. Implementations must be safe for concurrent use by multiple goroutines. In particular, any implementation of Logger that appends to keyvals or modifies any of its elements must make a copy first.
func NewFilterLogger ¶
NewFilterLogger returns a Logger that accepts only log messages with "level" value <= level. Currently there are four levels 0 - error, 1 - info, 2 - debug, 3 - trace.
func NewNopLogger ¶
func NewNopLogger() Logger
NewNopLogger returns a logger that doesn't do anything.
func NewStdLogger ¶
func NewStdLogger() Logger
NewStdLogger returns logger based on standard "log" package.