package test
import "github.com/sirupsen/logrus/hooks/test"
Index ¶
Types ¶
type Hook ¶
test.Hook is a hook designed for dealing with logs in test scenarios.
func NewGlobal ¶
func NewGlobal() *Hook
Installs a test hook for the global logger.
func NewLocal ¶
Installs a test hook for a given local logger.
func NewNullLogger ¶
Creates a discarding logger and installs the test hook.
func (*Hook) Fire ¶
func (*Hook) LastEntry ¶
LastEntry returns the last entry that was logged or nil.
func (*Hook) Levels ¶
func (*Hook) Reset ¶
func (t *Hook) Reset()
Reset removes all Entries from this test hook.
Source Files ¶
- Version
- v0.11.2
- Published
- Feb 7, 2017
- Platform
- js/wasm
- Imports
- 2 packages
- Last checked
- 5 hours ago –
Tools for package owners.