log

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logger *zap.Logger

Logger 日志

Functions

func Init

func Init()

Init 初始化日志

Types

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 added in v0.0.8

type SugaredLogger = zap.SugaredLogger

SugaredLogger 美化日志类型

var Sugar *SugaredLogger

Sugar 日志操作

type ZapLogger added in v0.1.0

type ZapLogger = zap.Logger

ZapLogger 便于传参

Jump to

Keyboard shortcuts

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