Documentation ¶
Overview ¶
Package waflog encapsulates getting logs from a WAF to compare with expected results
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FTWLogLines ¶
type FTWLogLines struct { LogMarkerHeaderName []byte StartMarker []byte EndMarker []byte // contains filtered or unexported fields }
FTWLogLines represents the filename to search for logs in a certain timespan
func NewFTWLogLines ¶
func NewFTWLogLines(cfg *config.FTWConfiguration) (*FTWLogLines, error)
NewFTWLogLines is the base struct for reading the log file
func (*FTWLogLines) CheckLogForMarker ¶
func (ll *FTWLogLines) CheckLogForMarker(stageID string, readLimit int) []byte
CheckLogForMarker reads the log file and searches for a marker line. stageID is the ID of the current stage, which is part of the marker line readLimit is the maximum numbers of lines to check
func (*FTWLogLines) Contains ¶
func (ll *FTWLogLines) Contains(match string) bool
Contains looks in logfile for regex
func (*FTWLogLines) WithEndMarker ¶ added in v0.4.5
func (ll *FTWLogLines) WithEndMarker(marker []byte)
WithEndMarker sets the end marker for the log file
func (*FTWLogLines) WithStartMarker ¶ added in v0.4.5
func (ll *FTWLogLines) WithStartMarker(marker []byte)
WithStartMarker sets the start marker for the log file
Click to show internal directories.
Click to hide internal directories.