Documentation ¶
Index ¶
- type LagerAdapter
- func (l *LagerAdapter) Debug(action string, data ...lager.Data)
- func (l *LagerAdapter) Error(action string, err error, data ...lager.Data)
- func (l *LagerAdapter) Fatal(action string, err error, data ...lager.Data)
- func (l *LagerAdapter) Info(action string, data ...lager.Data)
- func (l *LagerAdapter) RegisterSink(_ lager.Sink)
- func (l *LagerAdapter) Session(task string, data ...lager.Data) lager.Logger
- func (l *LagerAdapter) SessionName() string
- func (l *LagerAdapter) WithData(data lager.Data) lager.Logger
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LagerAdapter ¶
type LagerAdapter struct {
// contains filtered or unexported fields
}
LagerAdapter satisfies the lager.Logger interface with zap as the implementation.
func NewLagerAdapter ¶
func NewLagerAdapter(zapLogger Logger) *LagerAdapter
NewLagerAdapter returns a new lager.Logger that uses zap underneath.
func (*LagerAdapter) Debug ¶
func (l *LagerAdapter) Debug(action string, data ...lager.Data)
Debug logs a message at the debug log level.
func (*LagerAdapter) Error ¶
func (l *LagerAdapter) Error(action string, err error, data ...lager.Data)
Error logs a message at the error log level.
func (*LagerAdapter) Fatal ¶
func (l *LagerAdapter) Fatal(action string, err error, data ...lager.Data)
Fatal logs a message and exits with status 1.
func (*LagerAdapter) Info ¶
func (l *LagerAdapter) Info(action string, data ...lager.Data)
Info logs a message at the info log level.
func (*LagerAdapter) RegisterSink ¶
func (l *LagerAdapter) RegisterSink(_ lager.Sink)
RegisterSink is never used after initialization, so it does nothing.
func (*LagerAdapter) SessionName ¶
func (l *LagerAdapter) SessionName() string
SessionName returns the name of the logger session
type Logger ¶
type Logger interface { With(...zap.Field) Logger Check(zap.Level, string) *zap.CheckedMessage Log(zap.Level, string, ...zap.Field) Debug(string, ...zap.Field) Info(string, ...zap.Field) Warn(string, ...zap.Field) Error(string, ...zap.Field) DPanic(string, ...zap.Field) Panic(string, ...zap.Field) Fatal(string, ...zap.Field) Session(string) Logger SessionName() string }
Logger is the zap.Logger interface with additional Session methods.
Click to show internal directories.
Click to hide internal directories.