Documentation ¶
Index ¶
Constants ¶
View Source
const (
LoggerConfigFilename = "export-config.yaml"
)
Variables ¶
View Source
var (
ErrorInvalidFormat = errors.New("invalid format: expected jsonl or yaml")
)
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct { Store []Store // contains filtered or unexported fields }
func (*Logger) LogRequest ¶
LogRequest and user data
type OptionsLogger ¶
type OptionsLogger struct { Verbosity types.Verbosity OutputFolder string // when output is written to multiple files OutputFile string // when output is written to single file OutputFormat string // jsonl or yaml DumpRequest bool // dump request to file DumpResponse bool // dump response to file MaxSize int // max size of the output Elastic *elastic.Options Kafka *kafka.Options }
type OutputFileWriter ¶ added in v0.0.15
type OutputFileWriter interface { // Write writes a http transaction to the file. Write(data *types.HTTPRequestResponseLog) error // Close closes the file writer. Close() error }
OutputFileWriter is an interface for writing structured data to a file.
func NewOutputFileWriter ¶ added in v0.0.15
func NewOutputFileWriter(format, filePath string) (OutputFileWriter, error)
NewOutputFileWriter creates a new output file writer
type Store ¶
type Store interface {
Save(data types.HTTPTransaction) error
}
Click to show internal directories.
Click to hide internal directories.