logger

package
v1.2.17 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SetOutput func(output io.Writer)
	Info      func(args ...interface{})
	Infof     func(format string, args ...interface{})
	Error     func(args ...interface{})
	Errorf    func(format string, args ...interface{})
	Fatal     func(args ...interface{})
	Fatalf    func(format string, args ...interface{})
)

对外暴露的 log 接口

View Source
var (
	ReportCaller bool
)

全局 logger

Functions

func EchoLogHandler

func EchoLogHandler(LogToFile bool, LogFilePath string, LogFileName string, Debug bool) echo.MiddlewareFunc

Types

type EchoLogFormatter

type EchoLogFormatter struct {
	FullTimestamp   bool
	TimestampFormat string
}

EchoLogFormatter 可以根据自己需求自由命名

func (*EchoLogFormatter) Format

func (f *EchoLogFormatter) Format(entry *logrus.Entry) ([]byte, error)

Format 实现 logrus.Formatter 接口

Jump to

Keyboard shortcuts

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