httplog

package
v0.0.0-...-212a885 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTPLogs

func HTTPLogs(w http.ResponseWriter, r *http.Request)

HTTPLogs http 请求日志

Types

type Row

type Row struct {
	Time   string `json:"time"`
	Level  string `json:"level"`
	Caller string `json:"caller"`
	Msg    string `json:"message"`
}

{"Name": "time","Title":"时间","Type":"string","Width":160}, {"Name": "level","Title":"级别","Type":"string","Width":70}, {"Name": "caller","Title":"位置","Type":"string","Width":170}, {"Name": "message","Title":"消息","Type":"string"}

type WebWriter

type WebWriter struct {
	sync.RWMutex     // write log order by order and  atomic incr maxLinesCurLines and maxSizeCurSize
	MaxLines     int `json:"maxlines"`
	// contains filtered or unexported fields
}

WebWriter web 日志类

func (*WebWriter) Init

func (m *WebWriter) Init(config string) (err error)

Init 初始化

func (*WebWriter) Write

func (m *WebWriter) Write(b []byte) (n int, err error)

Write .

Jump to

Keyboard shortcuts

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