log

package
v0.0.0-...-47b434b Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessLog

type AccessLog struct {
	Status        int
	Method        string
	Host          string
	Path          string
	Query         string
	RequestSize   int64
	RemoteAddr    string
	XForwardedFor string
	UserAgent     string
	Referer       string
	Protocol      string
	Latency       time.Duration
}

func (*AccessLog) MarshalLogObject

func (a *AccessLog) MarshalLogObject(enc zapcore.ObjectEncoder) error

type Logger

type Logger struct {
	*zap.Logger
}

func NewLogger

func NewLogger() (*Logger, error)

func (*Logger) LogHTTPAccess

func (l *Logger) LogHTTPAccess(accessLog *AccessLog)

Jump to

Keyboard shortcuts

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