log

package
v0.0.0-...-1b41cfb Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logger, _ = zap.NewProduction()

Functions

func Error

func Error(template string, arguments interface{})

func GinLogger

func GinLogger(logger *zap.Logger) gin.HandlerFunc

GinLogger 接收gin框架默认的日志

func GinRecovery

func GinRecovery(logger *zap.Logger, stack bool) gin.HandlerFunc

GinRecovery recover掉项目可能出现的panic,并使用zap记录相关日志

func Info

func Info(template string, arguments interface{})

func InitLogger

func InitLogger() (err error)

InitLogger 初始化Logger

func Panic

func Panic(template string, arguments interface{})

Types

This section is empty.

Jump to

Keyboard shortcuts

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