Documentation ¶
Index ¶
- Variables
- type BufferLogger
- type BufferLoggerPool
- type Level
- type MuxLogger
- func (ml *MuxLogger) Debug(format interface{}, vars ...interface{})
- func (ml *MuxLogger) DebugWith(format interface{}, vars ...interface{})
- func (ml *MuxLogger) Error(format interface{}, vars ...interface{})
- func (ml *MuxLogger) ErrorWith(format interface{}, vars ...interface{})
- func (ml *MuxLogger) Flush()
- func (ml *MuxLogger) GetChild(name string) interface{}
- func (ml *MuxLogger) Info(format interface{}, vars ...interface{})
- func (ml *MuxLogger) InfoWith(format interface{}, vars ...interface{})
- func (ml *MuxLogger) SetLoggers(loggers ...nuclio.Logger)
- func (ml *MuxLogger) Warn(format interface{}, vars ...interface{})
- func (ml *MuxLogger) WarnWith(format interface{}, vars ...interface{})
- type NuclioZap
- func (nz *NuclioZap) Debug(format interface{}, vars ...interface{})
- func (nz *NuclioZap) DebugWith(format interface{}, vars ...interface{})
- func (nz *NuclioZap) Error(format interface{}, vars ...interface{})
- func (nz *NuclioZap) ErrorWith(format interface{}, vars ...interface{})
- func (nz *NuclioZap) Flush()
- func (nz *NuclioZap) GetChild(name string) interface{}
- func (nz *NuclioZap) GetLevel() Level
- func (nz *NuclioZap) Info(format interface{}, vars ...interface{})
- func (nz *NuclioZap) InfoWith(format interface{}, vars ...interface{})
- func (nz *NuclioZap) SetLevel(level Level)
- func (nz *NuclioZap) Warn(format interface{}, vars ...interface{})
- func (nz *NuclioZap) WarnWith(format interface{}, vars ...interface{})
Constants ¶
This section is empty.
Variables ¶
var ErrBufferPoolAllocationTimeout = errors.New("Timed out waiting for buffer logger")
Functions ¶
This section is empty.
Types ¶
type BufferLogger ¶
type BufferLogger struct { Logger *NuclioZap Buffer *bytes.Buffer // contains filtered or unexported fields }
a logger who outputs the records to a buffer
func NewBufferLogger ¶
func NewBufferLogger(name string, encoding string, level Level) (*BufferLogger, error)
func (*BufferLogger) GetJSONString ¶
func (bl *BufferLogger) GetJSONString() (string, error)
func (*BufferLogger) GetLogEntries ¶
func (bl *BufferLogger) GetLogEntries() ([]map[string]interface{}, error)
type BufferLoggerPool ¶
type BufferLoggerPool struct {
// contains filtered or unexported fields
}
a pool for buffer loggers
func NewBufferLoggerPool ¶
func NewBufferLoggerPool(numBufferLoggers int, name string, encoding string, level Level) (*BufferLoggerPool, error)
a pool of buffer loggers
func (*BufferLoggerPool) Allocate ¶
func (blp *BufferLoggerPool) Allocate(timeout *time.Duration) (*BufferLogger, error)
func (*BufferLoggerPool) Release ¶
func (blp *BufferLoggerPool) Release(bufferLogger *BufferLogger)
type Level ¶
type Level int8
Level is logging levels
const ( DebugLevel Level = Level(zapcore.DebugLevel) InfoLevel Level = Level(zapcore.InfoLevel) WarnLevel Level = Level(zapcore.WarnLevel) ErrorLevel Level = Level(zapcore.ErrorLevel) DPanicLevel Level = Level(zapcore.DPanicLevel) PanicLevel Level = Level(zapcore.PanicLevel) FatalLevel Level = Level(zapcore.FatalLevel) )
Predefined logging levels
func GetLevelByName ¶
GetLevelByName return logging level by name
type MuxLogger ¶
type MuxLogger struct {
// contains filtered or unexported fields
}
a logger that multiplexes logs towards multiple loggers
func NewMuxLogger ¶
func (*MuxLogger) DebugWith ¶
func (ml *MuxLogger) DebugWith(format interface{}, vars ...interface{})
func (*MuxLogger) ErrorWith ¶
func (ml *MuxLogger) ErrorWith(format interface{}, vars ...interface{})
func (*MuxLogger) SetLoggers ¶
func (ml *MuxLogger) SetLoggers(loggers ...nuclio.Logger)
type NuclioZap ¶
type NuclioZap struct { *zap.SugaredLogger // contains filtered or unexported fields }
NuclioZap is a concrete implementation of the nuclio logger interface, using zap
func NewNuclioZap ¶
func NewNuclioZap(name string, encoding string, sink io.Writer, errSink io.Writer, level Level) (*NuclioZap, error)
NewNuclioZap create a configurable logger
func NewNuclioZapCmd ¶
NewNuclioZapCmd creates a logger pre-configured for commands
func NewNuclioZapTest ¶
NewNuclioZapTest creates a logger pre-configured for tests
func (*NuclioZap) Debug ¶
func (nz *NuclioZap) Debug(format interface{}, vars ...interface{})
Debug emits debug level log
func (*NuclioZap) DebugWith ¶
func (nz *NuclioZap) DebugWith(format interface{}, vars ...interface{})
DebugWith emits debug level log with arguments
func (*NuclioZap) Error ¶
func (nz *NuclioZap) Error(format interface{}, vars ...interface{})
Errors emits error level log
func (*NuclioZap) ErrorWith ¶
func (nz *NuclioZap) ErrorWith(format interface{}, vars ...interface{})
ErrorWith emits error level log with arguments
func (*NuclioZap) Info ¶
func (nz *NuclioZap) Info(format interface{}, vars ...interface{})
Info emits info level log
func (*NuclioZap) InfoWith ¶
func (nz *NuclioZap) InfoWith(format interface{}, vars ...interface{})
InfoWith emits info level log with arguments