...
Package test
In the call graph viewer below, each node
is a function belonging to this package
and its children are the functions it
calls—perhaps dynamically.
The root nodes are the entry points of the
package: functions that may be called from
outside the package.
There may be non-exported or anonymous
functions among them if they are called
dynamically from another package.
Click a node to visit that function's source code.
From there you can visit its callers by
clicking its declaring func
token.
Functions may be omitted if they were
determined to be unreachable in the
particular programs or tests that were
analyzed.
func NewNullLogger() (*logrus.Logger, *Hook)
Creates a discarding logger and installs the test hook.
type Hook struct {
Entries []*logrus.Entry
}
test.Hook is a hook designed for dealing with logs in test scenarios.
func NewGlobal() *Hook
Installs a test hook for the global logger.
func NewLocal(logger *logrus.Logger) *Hook
Installs a test hook for a given local logger.
func (*Hook) Fire
func (t *Hook) Fire(e *logrus.Entry) error
func (t *Hook) LastEntry() (l *logrus.Entry)
LastEntry returns the last entry that was logged or nil.
func (*Hook) Levels
func (t *Hook) Levels() []logrus.Level
func (*Hook) Reset
func (t *Hook) Reset()
Reset removes all Entries from this test hook.