logs

package
v1.116.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLogParams

func GetLogParams(r *http.Request) (since time.Time, asFile bool, asFollow bool, logLines *int64, err error, previousLog bool)

GetLogParams Gets parameters for a log output

func NewRoundtripLogger

func NewRoundtripLogger(fns ...WithFunc) func(t http.RoundTripper) http.RoundTripper

NewRoundtripLogger returns a http.RoundTripper that logs failed requests, and add traces for successfull requests

nolint Zerolog complains about potential unsent event, but we send the event on the end of the function

Types

type RoundTripperFunc

type RoundTripperFunc func(*http.Request) (*http.Response, error)

RoundTripperFunc implements http.RoundTripper for convenient usage.

func (RoundTripperFunc) RoundTrip

func (fn RoundTripperFunc) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip satisfies http.RoundTripper and calls fn.

type WithFunc

type WithFunc func(e *zerolog.Event)

Jump to

Keyboard shortcuts

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