Str adds the field key with val as a string to the *Event context.
(key, val string)
| 313 | |
| 314 | // Str adds the field key with val as a string to the *Event context. |
| 315 | func (e *Event) Str(key, val string) *Event { |
| 316 | if e == nil { |
| 317 | return e |
| 318 | } |
| 319 | e.buf = enc.AppendString(enc.AppendKey(e.buf, key), val) |
| 320 | return e |
| 321 | } |
| 322 | |
| 323 | // Strs adds the field key with vals as a []string to the *Event context. |
| 324 | // |