lager

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ZapAdapter

type ZapAdapter struct {
	*zap.Logger
	// contains filtered or unexported fields
}

ZapAdapter is an adapter for lager log interface using zap logger

func NewZapAdapter

func NewZapAdapter(component string, zapLogger *zap.Logger) *ZapAdapter

NewZapAdapter creates a new ZapAdapter using the passed in zap.Logger

func (*ZapAdapter) Debug

func (l *ZapAdapter) Debug(action string, data ...lager.Data)

Debug logs a debug message

func (*ZapAdapter) Error

func (l *ZapAdapter) Error(action string, err error, data ...lager.Data)

Error logs an error message

func (*ZapAdapter) Fatal

func (l *ZapAdapter) Fatal(action string, err error, data ...lager.Data)

Fatal logs an fatal error message

func (*ZapAdapter) Info

func (l *ZapAdapter) Info(action string, data ...lager.Data)

Info logs a informative message

func (*ZapAdapter) RegisterSink

func (l *ZapAdapter) RegisterSink(_ lager.Sink)

RegisterSink of a ZapAdapter does noting as sinnk is configured in the underlying zap logger

func (*ZapAdapter) Session

func (l *ZapAdapter) Session(task string, data ...lager.Data) lager.Logger

Session creates a new logger appending task to the current session

func (*ZapAdapter) SessionName

func (l *ZapAdapter) SessionName() string

SessionName returns the current logging session name

func (*ZapAdapter) WithData

func (l *ZapAdapter) WithData(data lager.Data) lager.Logger

WithData returns a new logger with specified data fields set

Jump to

Keyboard shortcuts

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