Back to

Package log

Latest Go to latest

The highest tagged major version is .

Published: Oct 17, 2020 | License: MIT | Module:



var Logger *zap.Logger

Logger 日志

func Init

func Init()

Init 初始化日志

type Config

type Config struct {
	FileName   string `mapstructure:"file_name"`
	MaxSize    int    `mapstructure:"max_size"`
	MaxAge     int    `mapstructure:"max_age"`
	Level      string `mapstructure:"level"`
	SizeIncise bool   `mapstructrue:"size_incise"`

Config 日志配置信息

type SugaredLogger

type SugaredLogger = zap.SugaredLogger

SugaredLogger 美化日志类型

var Sugar *SugaredLogger

Sugar 日志操作

type ZapLogger

type ZapLogger = zap.Logger

ZapLogger 便于传参

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier