logger

package
v0.0.0-...-3233212 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogFormatText = "text"
	LogFormatJson = "json"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MyLogger

type MyLogger struct {
	*slog.Logger
}

func New

func New(env string, format string) *MyLogger

func (*MyLogger) HTTPError

func (l *MyLogger) HTTPError(w http.ResponseWriter, status int, err error)

func (*MyLogger) HTTPResponse

func (l *MyLogger) HTTPResponse(w http.ResponseWriter, status int, payload any)

func (*MyLogger) WrapError

func (l *MyLogger) WrapError(msg string, err error, args ...any)

Jump to

Keyboard shortcuts

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