logger

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Log = logrus.WithFields(logrus.Fields{"traceId": "-"})
)

Functions

func Columnize

func Columnize(nowFormatted, traceId, username string, latency time.Duration, status int, ip, method, path string, _byte int, message interface{}, headerMessage interface{}) string

func Exists

func Exists(path string) error

func GetLogFilename

func GetLogFilename() string

func GetTraceId

func GetTraceId(ctx iris.Context) string

func NewRequestLogger

func NewRequestLogger(dot func(...interface{})) (h iris.Handler, close func() error)

func PrintLogStatus

func PrintLogStatus()

func RollLogFile

func RollLogFile()

RollLogFile 滚动更新日志文件 按大小进行滚动,50M 一个文件,默认保留三个文件 保留个数可以通过 环境变量 LoggerRetainNumber 覆盖 单个日志文件大小 通过 LoggerFileSize 覆盖

Types

This section is empty.

Jump to

Keyboard shortcuts

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