logger

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

gin日志类 可以保存访问日志和错误恢复日志

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func E初始化Gin日志类

func E初始化Gin日志类(日志文件路径 string, 日志级别 string)

E初始化Gin日志类 初始化GinLogger

例子

logger.E初始化Gin日志类("./log/elog.log", "debug")
r.Use(logger.GinLogger(), logger.GinRecovery(true))

func GinLogger

func GinLogger() gin.HandlerFunc

GinLogger 接收gin框架默认的日志

func GinRecovery

func GinRecovery(stack bool) gin.HandlerFunc

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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