logger

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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

type Logger struct {
	Sugar *zap.SugaredLogger
}

Logger 封装日志对象

func New added in v0.1.8

func New() *Logger

New 创建日志对象,单例

func (Logger) Log added in v0.1.8

func (l Logger) Log(info ...interface{}) error

Log 实现 gokit 日志接口

Jump to

Keyboard shortcuts

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