Documentation ¶
Overview ¶
Package replay provides a deck backend for replaying log messages.
Index ¶
- Variables
- type Bundle
- type Log
- type Replay
- func (r *Replay) All() Bundle
- func (r *Replay) Close() error
- func (r *Replay) Debug() Bundle
- func (r *Replay) Error() Bundle
- func (r *Replay) Fatal() Bundle
- func (r *Replay) Info() Bundle
- func (r *Replay) New(lvl deck.Level, msg string) deck.Composer
- func (r *Replay) Reset()
- func (r *Replay) Warning() Bundle
Constants ¶
This section is empty.
Variables ¶
var ( // DEFAULT is a deck level for any messages not caught as coming from one of the standard levels. DEFAULT deck.Level = 1000 )
Functions ¶
This section is empty.
Types ¶
type Bundle ¶
type Bundle []Log
Bundle aggregates message entries as they're written to the deck. Each Replay instance keeps an internal Bundle, and returns copies of the Bundle to the user when queried.
func (Bundle) ContainsRE ¶
ContainsRE searches the Bundle for a message which matches the regular expression re.
func (Bundle) ContainsString ¶
ContainsString searches the Bundle for a string which contains str. This call uses strings.Contains which will match on substrings in addition to full strings.
type Log ¶
Log models a log entry as it's written to the Bundle. It tracks the log message but also other metadata that we may want to recall later, like the deck Level.
type Replay ¶
type Replay struct {
// contains filtered or unexported fields
}
Replay is a log deck backend that records log messages, allowing them to be replayed later.