AddCore adds a Core that has agreed to log this CheckedEntry. It's intended to be used by Core.Check implementations, and is safe to call on nil CheckedEntry references.
(ent Entry, core Core)
| 296 | // used by Core.Check implementations, and is safe to call on nil CheckedEntry |
| 297 | // references. |
| 298 | func (ce *CheckedEntry) AddCore(ent Entry, core Core) *CheckedEntry { |
| 299 | if ce == nil { |
| 300 | ce = getCheckedEntry() |
| 301 | ce.Entry = ent |
| 302 | } |
| 303 | ce.cores = append(ce.cores, core) |
| 304 | return ce |
| 305 | } |
| 306 | |
| 307 | // Should sets this CheckedEntry's CheckWriteAction, which controls whether a |
| 308 | // Core will panic or fatal after writing this log entry. Like AddCore, it's |