MCPcopy
hub / github.com/sirupsen/logrus / AllEntries

Method AllEntries

hooks/test/test.go:74–84  ·  view source on GitHub ↗

AllEntries returns all entries that were logged.

()

Source from the content-addressed store, hash-verified

72
73// AllEntries returns all entries that were logged.
74func (t *Hook) AllEntries() []*logrus.Entry {
75 t.mu.RLock()
76 defer t.mu.RUnlock()
77 // Make a copy so the returned value won't race with future log requests
78 entries := make([]*logrus.Entry, len(t.Entries))
79 for i := 0; i < len(t.Entries); i++ {
80 // Make a copy, for safety
81 entries[i] = &t.Entries[i]
82 }
83 return entries
84}
85
86// Reset removes all Entries from this test hook.
87func (t *Hook) Reset() {

Callers 1

TestLoggingWithHooksRaceFunction · 0.80

Implementers 10

panickyHookentry_test.go
DefaultFieldHookexample_default_field_value_test.go
TestHookhook_test.go
ModifyHookhook_test.go
ErrorHookhook_test.go
HookCallFunchook_test.go
GlobalHookexample_global_hook_test.go
Hookhooks/writer/writer.go
Hookhooks/test/test.go
SyslogHookhooks/syslog/syslog.go

Calls

no outgoing calls

Tested by 1

TestLoggingWithHooksRaceFunction · 0.64