logger

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2021 License: Apache-2.0 Imports: 6 Imported by: 29

Documentation

Index

Constants

View Source
const (
	JsonLogFormat = iota
	SyslogLogFormat
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller added in v0.1.31

type Controller struct {
	// contains filtered or unexported fields
}

func (*Controller) Enabled added in v0.1.31

func (c *Controller) Enabled() bool

func (*Controller) Error added in v0.1.31

func (c *Controller) Error(err error, msg string, keysAndValues ...interface{})

func (*Controller) Info added in v0.1.31

func (c *Controller) Info(msg string, keysAndValues ...interface{})

func (*Controller) V added in v0.1.31

func (c *Controller) V(level int) logr.InfoLogger

func (*Controller) WithName added in v0.1.31

func (c *Controller) WithName(name string) logr.Logger

func (*Controller) WithValues added in v0.1.31

func (c *Controller) WithValues(keysAndValues ...interface{}) logr.Logger

type Format

type Format int

type Handler

type Handler interface {
	Info(description ...string)
	Debug(description ...string)
	Warn(err error)
	Error(err error)

	// Kubernetes Controller compliant logger
	ControllerLogger() logr.Logger
}

func New

func New(appname string, opts Options) (Handler, error)

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func (*Logger) ControllerLogger added in v0.1.31

func (l *Logger) ControllerLogger() logr.Logger

func (*Logger) Debug

func (l *Logger) Debug(description ...string)

func (*Logger) Error

func (l *Logger) Error(err error)

func (*Logger) Info

func (l *Logger) Info(description ...string)

func (*Logger) Warn

func (l *Logger) Warn(err error)

type Options

type Options struct {
	Format     Format
	DebugLevel bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL