Documentation
¶
Overview ¶
Pacakge log is embedded (not imported) from https://github.com/jessepeterson/go-log
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NopLogger = &nopLogger{}
NopLogger is a Logger that does nothing.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger interface {
// Info logs using the info level.
Info(...interface{})
// Debug logs using the debug level.
Debug(...interface{})
// With returns a new nested Logger.
// Usually for adding logging additional context to an existing logger.
With(...interface{}) Logger
}
Logger is a generic logging interface for a structured, levelled, nest-able logger.
type MultiLogger ¶ added in v0.5.1
type MultiLogger struct {
// contains filtered or unexported fields
}
MultiLogger logs to multiple Loggers.
func NewMultiLogger ¶ added in v0.5.1
func NewMultiLogger(loggers ...Logger) *MultiLogger
NewMultiLogger creates a new MultiLogger with Loggers
func (*MultiLogger) Debug ¶ added in v0.5.1
func (ml *MultiLogger) Debug(keyvals ...interface{})
Info logs the debug level to each logger.
func (*MultiLogger) Info ¶ added in v0.5.1
func (ml *MultiLogger) Info(keyvals ...interface{})
Info logs the info level to each logger.
func (*MultiLogger) With ¶ added in v0.5.1
func (ml *MultiLogger) With(keyvals ...interface{}) Logger
With creates a new MultiLogger using passing context to each logger.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package ctxlog allows logging of key-value pairs stored with a context.
|
Package ctxlog allows logging of key-value pairs stored with a context. |
|
Package stdlogfmt adapts a NanoLIB Logger to the Golang standard library log package.
|
Package stdlogfmt adapts a NanoLIB Logger to the Golang standard library log package. |
Click to show internal directories.
Click to hide internal directories.