(skip int)
| 864 | } |
| 865 | |
| 866 | func (e *Event) caller(skip int) *Event { |
| 867 | if e == nil { |
| 868 | return e |
| 869 | } |
| 870 | if pc, file, line, ok := runtime.Caller(skip + e.skipFrame); ok { |
| 871 | e.buf = enc.AppendString(enc.AppendKey(e.buf, CallerFieldName), CallerMarshalFunc(pc, file, line)) |
| 872 | } |
| 873 | return e |
| 874 | } |
| 875 | |
| 876 | // IPAddr adds the field key with ip as a net.IP IPv4 or IPv6 Address to the event |
| 877 | func (e *Event) IPAddr(key string, ip net.IP) *Event { |
no test coverage detected