log

package
v0.0.0-...-a423d60 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// FieldComponentName is the key of the component field in the log message.
	FieldComponentName = "component"
	FieldCorrelationID = "x-request-id"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LagerAdapter

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

LagerAdapter is used to adapt log.Logger interface with logrus logger

func NewDefaultLagerAdapter

func NewDefaultLagerAdapter() *LagerAdapter

NewDefaultLagerAdapter returns new LagerAdapter from logrus entity

func (*LagerAdapter) Debug

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

Debug logs message on debug level

func (*LagerAdapter) Error

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

Error logs message on error level

func (*LagerAdapter) Fatal

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

Fatal logs message on fatal level

func (*LagerAdapter) Info

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

Info logs message on info level

func (*LagerAdapter) RegisterSink

func (l *LagerAdapter) RegisterSink(Sink)

RegisterSink is not applicable for LagerAdapter, implemented to satisfy log.Logger interface

func (*LagerAdapter) Session

func (l *LagerAdapter) Session(session string, data ...Data) Logger

Session returns new Logger with provided data

func (*LagerAdapter) SessionName

func (l *LagerAdapter) SessionName() string

SessionName returns session name

func (*LagerAdapter) WithData

func (l *LagerAdapter) WithData(data Data) Logger

WithData returns new Logger with provided data

Jump to

Keyboard shortcuts

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