Documentation ¶
Overview ¶
Package log provides an unified interface Logger for logging
Index ¶
- func EnableTracing(enable bool)
- func Fields(ctx context.Context) map[string]interface{}
- func IsTracingEnabled() bool
- func Join(ctx context.Context, log Logger) context.Context
- func WithFields(ctx context.Context, fields map[string]interface{}) context.Context
- func WithLog(ctx context.Context, log ...Logger) context.Context
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsTracingEnabled ¶
func IsTracingEnabled() bool
IsTracingEnabled - checks if it is allowed to use traces
func WithFields ¶
WithFields - adds fields to context
Types ¶
type Logger ¶
type Logger interface { Info(v ...interface{}) Infof(format string, v ...interface{}) Warn(v ...interface{}) Warnf(format string, v ...interface{}) Error(v ...interface{}) Errorf(format string, v ...interface{}) Fatal(v ...interface{}) Fatalf(format string, v ...interface{}) Debug(v ...interface{}) Debugf(format string, v ...interface{}) Trace(v ...interface{}) Tracef(format string, v ...interface{}) Object(k, v interface{}) WithField(key, value interface{}) Logger }
Logger - unified interface for logging
func FromContext ¶
FromContext - returns logger from context
Directories ¶
Path | Synopsis |
---|---|
Package logruslogger provides wrapper for logrus logger which is consistent with Logger interface
|
Package logruslogger provides wrapper for logrus logger which is consistent with Logger interface |
Package spanlogger provides a set of utilities to assist in working with opentracing spans
|
Package spanlogger provides a set of utilities to assist in working with opentracing spans |
Click to show internal directories.
Click to hide internal directories.