Documentation
¶
Overview ¶
Package log provides an unified interface Logger for logging
Index ¶
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 SetGlobalLogger ¶ added in v1.7.0
func SetGlobalLogger(logger Logger)
SetGlobalLogger Set the global Logger. This should be called early in main() only.
Types ¶
type Field ¶ added in v1.9.0
type Field struct {
// contains filtered or unexported fields
}
Field structure that is used for additional information in the logs
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 spans
|
Package spanlogger provides a set of utilities to assist in working with spans |
Click to show internal directories.
Click to hide internal directories.