logging

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: GPL-3.0 Imports: 0 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogData

type LogData struct {
	ReqId          string
	URL            string
	HttpStatusCode int
	Duration       int
	UserName       string
	Method         string
	RequestBody    any
	ResponseBody   any
}

type LogWriter

type LogWriter interface {
	LogRequest(data LogData)
	LogLine(msg string)
}

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func New

func New(lw LogWriter) *Logger

func (*Logger) LogLine

func (l *Logger) LogLine(msg string)

func (*Logger) LogRequest

func (l *Logger) LogRequest(logData LogData)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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