Documentation ¶
Index ¶
- type Context
- type ContextL
- type ContextLImpl
- func (l *ContextLImpl) Debugf(f string, params ...interface{})
- func (l *ContextLImpl) Errorf(f string, params ...interface{})
- func (l *ContextLImpl) GetLogContext() Context
- func (l *ContextLImpl) GetLogger() L
- func (l *ContextLImpl) Infof(f string, params ...interface{})
- func (l *ContextLImpl) SDebugf(lc Context, f string, params ...interface{})
- func (l *ContextLImpl) SErrorf(lc Context, f string, params ...interface{})
- func (l *ContextLImpl) SInfof(lc Context, f string, params ...interface{})
- func (l *ContextLImpl) SWarnf(lc Context, f string, params ...interface{})
- func (l *ContextLImpl) Warnf(f string, params ...interface{})
- type L
- type LoggerImpl
- func (l *LoggerImpl) Debugf(c Context, f string, params ...interface{})
- func (l *LoggerImpl) Errorf(c Context, f string, params ...interface{})
- func (l *LoggerImpl) GetUnderlyingLogger() Underlying
- func (l *LoggerImpl) Infof(c Context, f string, params ...interface{})
- func (l *LoggerImpl) Warnf(c Context, f string, params ...interface{})
- type NilContextS
- type SContext
- type SubContext
- type Underlying
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context interface {
GetLogPrefix() string
}
var NilContext Context = &NilContextS{}
func NewSubContext ¶
type ContextL ¶
type ContextL interface { Context Debugf(f string, params ...interface{}) Infof(f string, params ...interface{}) Warnf(f string, params ...interface{}) Errorf(f string, params ...interface{}) // Methods accepting one-time subcontexts SDebugf(lc Context, f string, params ...interface{}) SInfof(lc Context, f string, params ...interface{}) SWarnf(lc Context, f string, params ...interface{}) SErrorf(lc Context, f string, params ...interface{}) GetLogger() L GetLogContext() Context }
Logs within its Context.
func NewContextL ¶
func NewContextLFromUnderlying ¶
func NewContextLFromUnderlying(lc Context, ul Underlying) ContextL
func NewSubContextL ¶
type ContextLImpl ¶
func (*ContextLImpl) Debugf ¶
func (l *ContextLImpl) Debugf(f string, params ...interface{})
func (*ContextLImpl) Errorf ¶
func (l *ContextLImpl) Errorf(f string, params ...interface{})
func (*ContextLImpl) GetLogContext ¶
func (l *ContextLImpl) GetLogContext() Context
func (*ContextLImpl) GetLogger ¶
func (l *ContextLImpl) GetLogger() L
func (*ContextLImpl) Infof ¶
func (l *ContextLImpl) Infof(f string, params ...interface{})
func (*ContextLImpl) SDebugf ¶
func (l *ContextLImpl) SDebugf(lc Context, f string, params ...interface{})
func (*ContextLImpl) SErrorf ¶
func (l *ContextLImpl) SErrorf(lc Context, f string, params ...interface{})
func (*ContextLImpl) SInfof ¶
func (l *ContextLImpl) SInfof(lc Context, f string, params ...interface{})
func (*ContextLImpl) SWarnf ¶
func (l *ContextLImpl) SWarnf(lc Context, f string, params ...interface{})
func (*ContextLImpl) Warnf ¶
func (l *ContextLImpl) Warnf(f string, params ...interface{})
type L ¶
type L interface { Debugf(lc Context, f string, params ...interface{}) Infof(lc Context, f string, params ...interface{}) Warnf(lc Context, f string, params ...interface{}) Errorf(lc Context, f string, params ...interface{}) GetUnderlyingLogger() Underlying }
Logs and lets you specify the context.
type LoggerImpl ¶
type LoggerImpl struct {
UL Underlying
}
func (*LoggerImpl) Debugf ¶
func (l *LoggerImpl) Debugf(c Context, f string, params ...interface{})
func (*LoggerImpl) Errorf ¶
func (l *LoggerImpl) Errorf(c Context, f string, params ...interface{})
func (*LoggerImpl) GetUnderlyingLogger ¶
func (l *LoggerImpl) GetUnderlyingLogger() Underlying
func (*LoggerImpl) Infof ¶
func (l *LoggerImpl) Infof(c Context, f string, params ...interface{})
func (*LoggerImpl) Warnf ¶
func (l *LoggerImpl) Warnf(c Context, f string, params ...interface{})
type NilContextS ¶
type NilContextS struct{}
func (NilContextS) GetLogPrefix ¶
func (nc NilContextS) GetLogPrefix() string
type SContext ¶
type SContext struct {
S string
}
A barebones implementation of a Context.
func (SContext) GetLogPrefix ¶
type SubContext ¶
type SubContext struct {
// contains filtered or unexported fields
}
For nested, hierarchical Contexts.
func (*SubContext) GetLogPrefix ¶
func (slc *SubContext) GetLogPrefix() string
type Underlying ¶
type Underlying interface { Debugf(lp string, f string, params ...interface{}) Infof(lp string, f string, params ...interface{}) Warnf(lp string, f string, params ...interface{}) Errorf(lp string, f string, params ...interface{}) }
Implemented by github.com/kentik/ktranslate/pkg/util/logger Don't use this directly.
Click to show internal directories.
Click to hide internal directories.