Back to

Package lager

Latest Go to latest

The latest major version is .

Published: Jun 16, 2020 | License: Apache-2.0 | Module:


type ZapAdapter

type ZapAdapter struct {
	// 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

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier