logger

package
v0.0.0-...-aa5a986 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2022 License: AGPL-3.0 Imports: 6 Imported by: 1

Documentation

Overview

Package logger provides a middleware for logging with Gin using logrus

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogOptions

type LogOptions struct {
	EnableStarting bool
}

LogOptions logging middleware options

type LoggingMiddleware

type LoggingMiddleware struct {
	// contains filtered or unexported fields
}

LoggingMiddleware is a middleware handler that logs the request as it goes in and the response as it goes out.

func New

func New(l *logrus.Logger, options LogOptions) *LoggingMiddleware

New returns a new *LoggingMiddleware, yay!

func (*LoggingMiddleware) HandleFunc

func (m *LoggingMiddleware) HandleFunc(context *gin.Context)

HandleFunc is the function for processing requests in the chain and logging

Jump to

Keyboard shortcuts

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