logrus

package module
v0.0.0-...-38e17da Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init() logger.Logger

Types

type LogrusProvider

type LogrusProvider struct {
	*logrus.Logger
	// contains filtered or unexported fields
}

LogrusProvider is a concrete implementation of the Logger interface using logrus.Logger.

func New

func New(mode string) (*LogrusProvider, error)

NewLogrusProvider initializes a new logrus-based Logger.

func (*LogrusProvider) DPanic

func (l *LogrusProvider) DPanic(msg string, fields map[string]any)

func (*LogrusProvider) Debug

func (l *LogrusProvider) Debug(msg string, fields map[string]any)

Implementing the Logger interface methods for LogrusProvider.

func (*LogrusProvider) Error

func (l *LogrusProvider) Error(msg string, fields map[string]any)

func (*LogrusProvider) Fatal

func (l *LogrusProvider) Fatal(msg string, fields map[string]any)

func (*LogrusProvider) Info

func (l *LogrusProvider) Info(msg string, fields map[string]any)

func (*LogrusProvider) Panic

func (l *LogrusProvider) Panic(msg string, fields map[string]any)

func (*LogrusProvider) Sync

func (l *LogrusProvider) Sync() error

func (*LogrusProvider) Warn

func (l *LogrusProvider) Warn(msg string, fields map[string]any)

func (*LogrusProvider) WithContext

func (l *LogrusProvider) WithContext(fields map[string]any) *LogrusProvider

WithContext creates a new LogrusProvider with contextual fields.

Jump to

Keyboard shortcuts

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