Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextWithLogger ¶ added in v0.2.3
ContextWithLogger returns a new context that holds a reference to the logger.
func Debug ¶
func Debug(kv ...interface{}) error
Debug logs a debug-level event using singleton logger.
func Error ¶
func Error(kv ...interface{}) error
Error logs an error-level event using singleton logger.
func Info ¶
func Info(kv ...interface{}) error
Info logs an info-level event using singleton logger.
func SetOptions ¶
func SetOptions(opts Options)
SetOptions set optional options for singleton logger.
Types ¶
type Logger ¶
type Logger struct { Level Level Logger *kitLog.SwapLogger }
Logger wraps a go-kit Logger.
func LoggerFromContext ¶ added in v0.2.3
LoggerFromContext returns a logger set on a context. If no logger found on the context, the singleton logger will be returned.
func NewVoidLogger ¶ added in v0.2.0
func NewVoidLogger() *Logger
NewVoidLogger creates a void logger for testing purposes.
func (*Logger) SetOptions ¶ added in v0.2.0
SetOptions resets a logger with new options.
Click to show internal directories.
Click to hide internal directories.