logger

package
v0.0.0-...-dfab029 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: MIT Imports: 16 Imported by: 0

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