kaoriLog

package module
v0.0.0-...-1aee6c4 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2021 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogRequestHandler

func LogRequestHandler(filePath string, h http.Handler) http.Handler

func PrintLog

func PrintLog(user, ip, function, msg string, lvl int)

Types

type HTTPReqInfo

type HTTPReqInfo struct {
	Method    string        `json:"method"`
	Url       string        `json:"url"`
	Referer   string        `json:"ref"`
	Ipaddr    string        `json:"ip"`
	Code      int           `json:"code"` //Response Code 200, 400 ecc.
	Size      int64         `json:"size"` //Numero byte della risposta
	Duration  time.Duration `json:"duration"`
	Data      int64         `json:"data"`
	UserAgent string        `json:"agent"`
	// contains filtered or unexported fields
}

func (*HTTPReqInfo) LogHTTPReq

func (ri *HTTPReqInfo) LogHTTPReq(filePath string)

type ServerLog

type ServerLog struct {
	Func  string
	Ip    string
	Level string
	Msg   string
	Time  time.Time
	User  string
}

func (*ServerLog) Filter

func (srvLog *ServerLog) Filter(filter string)

Jump to

Keyboard shortcuts

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