accesslog

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FormatCommon   = `%h %l %u %t "%r" %>s %b`
	FormatCombined = `%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-agent}i"`
)

Variables

View Source
var (
	// HeaderKeyOriginalRequestURI is a key to store original RequestURI.
	HeaderKeyOriginalRequestURI = []byte("Original-Request-URI")
)
View Source
var (
	NilAccessLog nilAccessLog
)

Functions

This section is empty.

Types

type AccessLog

type AccessLog interface {
	logger.Rotator
	io.Closer
	// Collect collects informations before Log.
	Collect(ctx *fasthttp.RequestCtx)
	// Log writes access log.
	Log(ctx *fasthttp.RequestCtx)
}

AccessLog is an interface to write access log.

func NewAccessLog

func NewAccessLog(cfg config.Config) (AccessLog, error)

NewAccessLog returns a new AccessLog.

Jump to

Keyboard shortcuts

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