Documentation ¶
Index ¶
- Constants
- func InitDevelLoggers()
- func InitLoggers(development bool, encoder string, logLevel string, stackTraceLevel string, ...)
- func TimeTrack(log logr.Logger, start time.Time, name string)
- type HCLogAdapter
- func (l *HCLogAdapter) Clone() *HCLogAdapter
- func (l *HCLogAdapter) Debug(msg string, args ...interface{})
- func (l *HCLogAdapter) Error(msg string, args ...interface{})
- func (l *HCLogAdapter) GetUnderlying() *zap.Logger
- func (l *HCLogAdapter) ImpliedArgs() []interface{}
- func (l *HCLogAdapter) Info(msg string, args ...interface{})
- func (l *HCLogAdapter) IsDebug() bool
- func (l *HCLogAdapter) IsError() bool
- func (l *HCLogAdapter) IsInfo() bool
- func (l *HCLogAdapter) IsTrace() bool
- func (l *HCLogAdapter) IsWarn() bool
- func (l *HCLogAdapter) Log(level hclog.Level, msg string, args ...interface{})
- func (l *HCLogAdapter) Name() string
- func (l *HCLogAdapter) Named(name string) hclog.Logger
- func (l *HCLogAdapter) ResetNamed(name string) hclog.Logger
- func (l *HCLogAdapter) SetLevel(level hclog.Level)
- func (l *HCLogAdapter) StandardLogger(opts *hclog.StandardLoggerOptions) *log.Logger
- func (l *HCLogAdapter) StandardWriter(opts *hclog.StandardLoggerOptions) io.Writer
- func (l *HCLogAdapter) Trace(msg string, args ...interface{})
- func (l *HCLogAdapter) Warn(msg string, args ...interface{})
- func (l *HCLogAdapter) With(args ...interface{}) hclog.Logger
Constants ¶
const (
DebugLevel = 1
)
Variables ¶
This section is empty.
Functions ¶
func InitDevelLoggers ¶ added in v0.6.9
func InitDevelLoggers()
InitDevelLoggers Configure zap backend development logger
Types ¶
type HCLogAdapter ¶ added in v0.6.9
type HCLogAdapter struct {
// contains filtered or unexported fields
}
HCLogAdapter is an adapter that allows to use a zap.Logger where and hclog.Logger is expected.
func NewHCLogAdapter ¶ added in v0.6.9
func NewHCLogAdapter(wrapped *zap.Logger) *HCLogAdapter
NewHCLogAdapter creates a new adapter, wrapping an underlying zap.Logger inside an implementation that emulates hclog.Logger.
func (*HCLogAdapter) Clone ¶ added in v0.6.9
func (l *HCLogAdapter) Clone() *HCLogAdapter
func (*HCLogAdapter) Debug ¶ added in v0.6.9
func (l *HCLogAdapter) Debug(msg string, args ...interface{})
Debug - emit a message and key/value pairs at the DEBUG level
func (*HCLogAdapter) Error ¶ added in v0.6.9
func (l *HCLogAdapter) Error(msg string, args ...interface{})
Error - emit a message and key/value pairs at the ERROR level
func (*HCLogAdapter) GetUnderlying ¶ added in v0.6.9
func (l *HCLogAdapter) GetUnderlying() *zap.Logger
func (*HCLogAdapter) ImpliedArgs ¶ added in v0.6.9
func (l *HCLogAdapter) ImpliedArgs() []interface{}
ImpliedArgs has no implementation.
func (*HCLogAdapter) Info ¶ added in v0.6.9
func (l *HCLogAdapter) Info(msg string, args ...interface{})
Info - emit a message and key/value pairs at the INFO level
func (*HCLogAdapter) IsDebug ¶ added in v0.6.9
func (l *HCLogAdapter) IsDebug() bool
func (*HCLogAdapter) IsError ¶ added in v0.6.9
func (l *HCLogAdapter) IsError() bool
func (*HCLogAdapter) IsInfo ¶ added in v0.6.9
func (l *HCLogAdapter) IsInfo() bool
func (*HCLogAdapter) IsTrace ¶ added in v0.6.9
func (l *HCLogAdapter) IsTrace() bool
func (*HCLogAdapter) IsWarn ¶ added in v0.6.9
func (l *HCLogAdapter) IsWarn() bool
func (*HCLogAdapter) Log ¶ added in v0.6.9
func (l *HCLogAdapter) Log(level hclog.Level, msg string, args ...interface{})
func (*HCLogAdapter) Name ¶ added in v0.6.9
func (l *HCLogAdapter) Name() string
Name returns a logger's name (if presented).
func (*HCLogAdapter) Named ¶ added in v0.6.9
func (l *HCLogAdapter) Named(name string) hclog.Logger
Named returns a logger with the specific name.
func (*HCLogAdapter) ResetNamed ¶ added in v0.6.9
func (l *HCLogAdapter) ResetNamed(name string) hclog.Logger
ResetNamed has the same implementation as Named.
func (*HCLogAdapter) SetLevel ¶ added in v0.6.9
func (l *HCLogAdapter) SetLevel(level hclog.Level)
SetLevel has no implementation.
func (*HCLogAdapter) StandardLogger ¶ added in v0.6.9
func (l *HCLogAdapter) StandardLogger(opts *hclog.StandardLoggerOptions) *log.Logger
func (*HCLogAdapter) StandardWriter ¶ added in v0.6.9
func (l *HCLogAdapter) StandardWriter(opts *hclog.StandardLoggerOptions) io.Writer
StandardWriter returns os.Stderr as io.Writer.
func (*HCLogAdapter) Trace ¶ added in v0.6.9
func (l *HCLogAdapter) Trace(msg string, args ...interface{})
Trace - emit a message and key/value pairs at the TRACE level
func (*HCLogAdapter) Warn ¶ added in v0.6.9
func (l *HCLogAdapter) Warn(msg string, args ...interface{})
Warn - emit a message and key/value pairs at the WARN level
func (*HCLogAdapter) With ¶ added in v0.6.9
func (l *HCLogAdapter) With(args ...interface{}) hclog.Logger
With returns a logger with always-presented key-value pairs.