logging

package
v0.0.0-...-9f6cae3 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2026 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Logger 全局日志实例
	Logger = logrus.New()
)

Functions

func Debug

func Debug(args ...interface{})

Debug 记录Debug级别日志

func Debugf

func Debugf(format string, args ...interface{})

Debugf 记录Debug级别格式化日志

func Error

func Error(args ...interface{})

Error 记录Error级别日志

func Errorf

func Errorf(format string, args ...interface{})

Errorf 记录Error级别格式化日志

func F

func F() (ret int)

func Fatal

func Fatal(args ...interface{})

Fatal 记录Fatal级别日志并退出程序

func Fatalf

func Fatalf(format string, args ...interface{})

Fatalf 记录Fatal级别格式化日志并退出程序

func Info

func Info(args ...interface{})

Info 记录Info级别日志

func Infof

func Infof(format string, args ...interface{})

Infof 记录Info级别格式化日志

func Init

func Init()

Init 初始化日志系统

func SetLevel

func SetLevel(level logrus.Level)

SetLevel 设置日志级别

func Warn

func Warn(args ...interface{})

Warn 记录Warn级别日志

func Warnf

func Warnf(format string, args ...interface{})

Warnf 记录Warn级别格式化日志

func Where

func Where()

func WithError

func WithError(err error) *logrus.Entry

WithError 添加错误上下文

func WithField

func WithField(key string, value interface{}) *logrus.Entry

WithField 添加单个字段

func WithFields

func WithFields(fields logrus.Fields) *logrus.Entry

WithFields 添加多个字段

Types

This section is empty.

Jump to

Keyboard shortcuts

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