zap icon indicating copy to clipboard operation
zap copied to clipboard

zapcore.Entry documentation is outdated

Open delixfe opened this issue 3 years ago • 0 comments

It still states that Entries are pooled. According to #380 this changed.

Additionally, Entry does not technically represent a complete log message:

  • the structured context is hold by the encoder
  • fields are separate.

The doc as fast reference:

// An Entry represents a complete log message. The entry's structured context
// is already serialized, but the log level, time, message, and call site
// information are available for inspection and modification. Any fields left
// empty will be omitted when encoding.
//
// Entries are pooled, so any functions that accept them MUST be careful not to
// retain references to them.

delixfe avatar Dec 14 '21 09:12 delixfe