Logger

package module
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2022 License: Apache-2.0 Imports: 11 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

go-gin-logger

gin-logger-middleware

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultLogger

func DefaultLogger() gin.HandlerFunc

使用日志框架logrus日志记录到文件

func GetLogPath

func GetLogPath() string

获取日志路径

func GetLogger

func GetLogger() *logrus.Logger

获取logger

func InitJsonLogger added in v1.1.0

func InitJsonLogger(logPath *string)

*

  • @Author yNsLuHan
  • @Description:
  • @Time 2021-06-28 09:20:20

func JsonLogger

func JsonLogger() gin.HandlerFunc

使用日志框架logrus日志记录到文件

func LoggerToES

func LoggerToES() gin.HandlerFunc

日志记录到 ES

func LoggerToMQ

func LoggerToMQ() gin.HandlerFunc

日志记录到 MQ

func LoggerToMongo

func LoggerToMongo() gin.HandlerFunc

日志记录到 MongoDB

func LogsFormatArgs

func LogsFormatArgs(c *gin.Context) (time.Duration, string, string, int, string)

*

  • @Author yNsLuHan
  • @Description: 获取基本参数
  • @Time 2021-06-28 10:31:32
  • @param c
  • @return time.Duration
  • @return string
  • @return string
  • @return int
  • @return string

Types

This section is empty.

Jump to

Keyboard shortcuts

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