accesslog

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccessLog

func AccessLog(options Options) gin.HandlerFunc

AccessLog records server access logs

Types

type Options

type Options struct {
	Logger           *slog.Logger
	Msg              string
	ShowCost         bool
	ShowIp           bool
	ShowAgent        bool
	ShowURL          bool
	ShowPath         bool
	ShowRoute        bool
	ShowRequestId    bool
	ShowRequestSize  bool
	ShowResponseSize bool
	ShowError        bool
}

func DefaultOptions

func DefaultOptions(logger *slog.Logger, msg string) Options

Jump to

Keyboard shortcuts

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