MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / WithField

Method WithField

pkg/log/fields.go:99–105  ·  view source on GitHub ↗

WithField returns a new fielder that has the key set to value.

(name string, val any)

Source from the content-addressed store, hash-verified

97
98// WithField returns a new fielder that has the key set to value.
99func (f *F) WithField(name string, val any) *F {
100 nodes := map[string]any{
101 name: val,
102 }
103
104 return f.With(nodes)
105}
106
107// WithFields returns a new fielder that has all the fields of the other fielder.
108func (f *F) WithFields(fields Fielder) *F {

Callers 1

WithErrorMethod · 0.95

Calls 1

WithMethod · 0.95

Tested by

no test coverage detected