trafficlogs

package
v2.13.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const TrafficLogFilePrefixFormat = log.LogFileTimestampPrefixFormat

Variables

This section is empty.

Functions

func RequestFilePath added in v2.8.1

func RequestFilePath() string

RequestFilePath returns the full path of an HTTP request log file for the current execution time - if no traffic logs are written (yet) no file may exist at this path.

func ResponseFilePath added in v2.8.1

func ResponseFilePath() string

ResponseFilePath returns the full path of an HTTP response log file for the current execution time - if no traffic logs are written (yet) no file may exist at this path.

Types

type FileBasedLogger added in v2.6.0

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

func NewFileBased added in v2.6.0

func NewFileBased() *FileBasedLogger

func (*FileBasedLogger) Close added in v2.6.0

func (l *FileBasedLogger) Close()

func (*FileBasedLogger) Log added in v2.6.0

func (l *FileBasedLogger) Log(req *http.Request, reqBody string, resp *http.Response, respBody string) error

Log takes request and response data and tries to write them into files created by this logger. Note: this method is used by the "old" rest.Client and not the one from configuration-as-code-core

func (*FileBasedLogger) LogToFiles added in v2.8.0

func (l *FileBasedLogger) LogToFiles(record lib.RequestResponse)

LogToFiles takes a record containing request and response information and tries to write it into the files created by this logger.

Jump to

Keyboard shortcuts

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