Before adds a pre-write hook that transforms the Entry and Fields before they are written to any registered Cores. Multiple hooks run in the order they were added. It's safe to call this on nil CheckedEntry references.
(ent Entry, hook CheckPreWriteHook)
| 317 | // they are written to any registered Cores. Multiple hooks run in the order |
| 318 | // they were added. It's safe to call this on nil CheckedEntry references. |
| 319 | func (ce *CheckedEntry) Before(ent Entry, hook CheckPreWriteHook) *CheckedEntry { |
| 320 | if ce == nil { |
| 321 | ce = getCheckedEntry() |
| 322 | ce.Entry = ent |
| 323 | } |
| 324 | ce.before = append(ce.before, hook) |
| 325 | return ce |
| 326 | } |
| 327 | |
| 328 | // After sets this CheckEntry's CheckWriteHook, which will be called after this |
| 329 | // log entry has been written. It's safe to call this on nil CheckedEntry |