Categorygithub.com/caryxiao/go-zlog
modulepackage
1.0.0
Repository: https://github.com/caryxiao/go-zlog.git
Documentation: pkg.go.dev

# README

go-zlog

日志插件, 用于输出日志到指定位置, 方便调试, 本库是对 logrus 进行了封装

日志所用到的库

logrus 日志

logrus-prefixed-formatter 日志格式化

使用方法

import "github.com/caryxiao/go-zlog"
func main() {
  zlog.SetOutput("/tmp/zlog.log")
  zlog.SetLevel(5)
  zlog.SetFormat("[%level%]: %time% - [%trace_id%] %msg%")
  zlog.Logger.Debug("test debug")
}

# Functions

设置格式化的格式.
设置日志输出级别.
设置输出的位置.

# Constants

DebugLevel level.
ErrorLevel level.
FatalLevel level.
InfoLevel level.
No description provided by the author
TraceLevel level.
WarnLevel level.

# Variables

No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author