Documentation ¶
Index ¶
- func NewContext(ctx context.Context, logger *Logger) context.Context
- type Level
- type Logger
- func (l *Logger) Debug(v ...interface{})
- func (l *Logger) Debugf(format string, v ...interface{})
- func (l *Logger) Error(v ...interface{})
- func (l *Logger) Errorf(format string, v ...interface{})
- func (l *Logger) Info(v ...interface{})
- func (l *Logger) Infof(format string, v ...interface{})
- func (l *Logger) Warn(v ...interface{})
- func (l *Logger) Warnf(format string, v ...interface{})
- type LoggerInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func FromContext ¶
FromContext returns the Logger ctx carries. It panics in case ctx carries no Logger.
func MaybeFromContext ¶
type LoggerInterface ¶
type LoggerInterface interface { Debug(v ...interface{}) Debugf(format string, v ...interface{}) }
Click to show internal directories.
Click to hide internal directories.