Documentation ¶
Index ¶
- type Hook
- func (t *Hook) CheckAllContained(tb testing.TB, strs ...string)
- func (t *Hook) CheckContained(tb testing.TB, strs ...string)
- func (t *Hook) CheckNotContained(tb testing.TB, strs ...string)
- func (t *Hook) Entries() []*logrus.Entry
- func (t *Hook) Fire(e *logrus.Entry) error
- func (t *Hook) LastEntry() (l *logrus.Entry)
- func (t *Hook) Levels() []logrus.Level
- func (t *Hook) Reset()
- func (t *Hook) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hook ¶
Hook is a hook designed for dealing with logs in test scenarios.
func NewNullLogger ¶
NewNullLogger Creates a discarding logger and installs the test hook.
func (*Hook) CheckAllContained ¶
CheckAllContained looks through all the passed strings and verifies that all of them have been logged.
func (*Hook) CheckContained ¶
CheckContained looks through all the passed strings and verifies that at least one of those have been logged.
func (*Hook) CheckNotContained ¶
CheckNotContained looks through all the passed strings and verifies that none of those fragments have been logged.
Click to show internal directories.
Click to hide internal directories.