Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitGlobalLogger ¶
InitGlobalLogger creates a new SugaredLogger and assigns it as the global logger
func SetGlobalLogger ¶
func SetGlobalLogger(l *zap.SugaredLogger)
SetGlobalLogger takes a Logger instance as the input and sets it as the global logger, useful for testing.
func WithContext ¶
func WithContext(ctx context.Context) *zap.SugaredLogger
WithContext returns a zap logger with as much context as possible
Types ¶
type Logger ¶
type Logger interface { Debugw(template string, args ...interface{}) Errorf(template string, args ...interface{}) Errorw(msg string, keysAndValues ...interface{}) Infof(template string, args ...interface{}) Infow(template string, args ...interface{}) Panicf(template string, args ...interface{}) Warnw(template string, args ...interface{}) Sync() error }
Logger interface captures the logging functions exposed for the turing router, abstracting away the underlying logging library.
Click to show internal directories.
Click to hide internal directories.