Documentation ¶
Index ¶
- Constants
- type LagerAdapter
- func (l *LagerAdapter) Debug(action string, data ...Data)
- func (l *LagerAdapter) Error(action string, err error, data ...Data)
- func (l *LagerAdapter) Fatal(action string, err error, data ...Data)
- func (l *LagerAdapter) Info(action string, data ...Data)
- func (l *LagerAdapter) RegisterSink(Sink)
- func (l *LagerAdapter) Session(session string, data ...Data) Logger
- func (l *LagerAdapter) SessionName() string
- func (l *LagerAdapter) WithData(data Data) Logger
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
Click to show internal directories.
Click to hide internal directories.