AllUntimed returns a copy of all the observed logs, but overwrites the observed timestamps with time.Time's zero value. This is useful when making assertions in tests.
()
| 70 | // observed timestamps with time.Time's zero value. This is useful when making |
| 71 | // assertions in tests. |
| 72 | func (o *ObservedLogs) AllUntimed() []LoggedEntry { |
| 73 | ret := o.All() |
| 74 | for i := range ret { |
| 75 | ret[i].Time = time.Time{} |
| 76 | } |
| 77 | return ret |
| 78 | } |
| 79 | |
| 80 | // FilterLevelExact filters entries to those logged at exactly the given level. |
| 81 | func (o *ObservedLogs) FilterLevelExact(level zapcore.Level) *ObservedLogs { |