logger

package
v1.0.1-rc1 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: MIT Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// RequestComponent — компонент middleware логирования запросов для Compogo.
	// Регистрирует Request в DI-контейнере.
	RequestComponent = compogo.Component{
		Init: compogo.StepFunc(func(container compogo.Container) error {
			return container.Provide(NewRequest)
		}),
	}

	// ResponseComponent — компонент middleware логирования ответов для Compogo.
	// Регистрирует Response в DI-контейнере.
	ResponseComponent = compogo.Component{
		Init: compogo.StepFunc(func(container compogo.Container) error {
			return container.Provide(NewResponse)
		}),
	}
)

Functions

This section is empty.

Types

type Request

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

Request — middleware для логирования входящих HTTP-запросов. Логирует путь и тело запроса.

func NewRequest

func NewRequest(logger compogo.Logger) *Request

func (*Request) Middleware

func (r *Request) Middleware(next http.Handler) http.Handler

type Response

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

Response — middleware для логирования исходящих HTTP-ответов. Логирует тело ответа.

func NewResponse

func NewResponse(logger compogo.Logger) *Response

func (*Response) Middleware

func (r *Response) Middleware(next http.Handler) http.Handler

Jump to

Keyboard shortcuts

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