logging

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: MIT 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 {
	Info(msg string, fields ...map[string]interface{})
	Error(msg string, err error, fields ...map[string]interface{})
	Debug(msg string, fields ...map[string]interface{})
	Warn(msg string, fields ...map[string]interface{})
}

Logger 通用日志接口

func NewDefaultLogger

func NewDefaultLogger(filePath string) (Logger, error)

NewDefaultLogger 创建默认日志记录器,写入指定文件

func NewNoopLogger

func NewNoopLogger() Logger

NewNoopLogger 创建一个空的日志记录器

Jump to

Keyboard shortcuts

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