logger

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2025 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger interface {
	Debug(msg string, fields ...interface{})
	Info(msg string, fields ...interface{})
	Warn(msg string, fields ...interface{})
	Error(msg string, fields ...interface{})
	Fatal(msg string, fields ...interface{})
}

Logger 日志接口

type LogrusLogger

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

LogrusLogger logrus日志实现

func NewLogger

func NewLogger(level string) *LogrusLogger

NewLogger 创建新的日志器

func (*LogrusLogger) Debug

func (l *LogrusLogger) Debug(msg string, fields ...interface{})

Debug 调试日志

func (*LogrusLogger) Error

func (l *LogrusLogger) Error(msg string, fields ...interface{})

Error 错误日志

func (*LogrusLogger) Fatal

func (l *LogrusLogger) Fatal(msg string, fields ...interface{})

Fatal 致命错误日志

func (*LogrusLogger) Info

func (l *LogrusLogger) Info(msg string, fields ...interface{})

Info 信息日志

func (*LogrusLogger) Warn

func (l *LogrusLogger) Warn(msg string, fields ...interface{})

Warn 警告日志

Jump to

Keyboard shortcuts

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