logger

package
v0.0.0-...-89409de Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: MIT Imports: 16 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

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	Store []Store
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger(options *OptionsLogger) *Logger

NewLogger instance

func (*Logger) AsyncWrite

func (l *Logger) AsyncWrite()

AsyncWrite data

func (*Logger) Close

func (l *Logger) Close()

Close logger instance

func (*Logger) LogRequest

func (l *Logger) LogRequest(req *http.Request, userdata types.UserData) error

LogRequest and user data

func (*Logger) LogResponse

func (l *Logger) LogResponse(resp *http.Response, userdata types.UserData) error

LogResponse and user data

type OptionsLogger

type OptionsLogger struct {
	Verbosity    types.Verbosity
	OutputFolder string
	DumpRequest  bool
	DumpResponse bool
	OutputJsonl  bool
	MaxSize      int
	Elastic      *elastic.Options
	Kafka        *kafka.Options
}

type Store

type Store interface {
	Save(data types.OutputData) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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