Documentation ¶
Index ¶
- Variables
- func Columnize(nowFormatted, traceId, username string, latency time.Duration, status int, ...) string
- func Exists(path string) error
- func GetLogFilename() string
- func GetTraceId(ctx iris.Context) string
- func NewRequestLogger(dot func(...interface{})) (h iris.Handler, close func() error)
- func PrintLogStatus()
- func RollLogFile()
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Log = logrus.WithFields(logrus.Fields{"traceId": "-"})
)
Functions ¶
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.
Click to show internal directories.
Click to hide internal directories.