Hook is a hook designed for dealing with logs in test scenarios.
| 11 | |
| 12 | // Hook is a hook designed for dealing with logs in test scenarios. |
| 13 | type Hook struct { |
| 14 | // Entries is an array of all entries that have been received by this hook. |
| 15 | // For safe access, use the AllEntries() method, rather than reading this |
| 16 | // value directly. |
| 17 | Entries []logrus.Entry |
| 18 | mu sync.RWMutex |
| 19 | } |
| 20 | |
| 21 | // NewGlobal installs a test hook for the global logger. |
| 22 | func NewGlobal() *Hook { |
nothing calls this directly
no outgoing calls
no test coverage detected