log

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: May 1, 2025 License: GPL-3.0 Imports: 0 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Field

type Field struct {
	Key   string
	Value any
}

func NewField

func NewField(key string, value any) Field

type LogData

type LogData struct {
	RequestID      string
	URL            string
	HTTPStatusCode int
	Duration       int
	UserName       string
	Method         string
	RequestBody    any
	ResponseBody   any
}

type Writer

type Writer interface {
	LogRequest(data LogData)
	New(name string, fields ...Field) Writer
	Named(name string) Writer
	With(fields ...Field) Writer
	Info(format string, args ...any)
	Warn(format string, args ...any)
	Debug(format string, args ...any)
	Error(format string, err error, args ...any)
	Sync()
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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