summaryrefslogtreecommitdiffstats
path: root/vendor/go.uber.org/zap/field.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/go.uber.org/zap/field.go')
-rw-r--r--vendor/go.uber.org/zap/field.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/vendor/go.uber.org/zap/field.go b/vendor/go.uber.org/zap/field.go
index 3c0d7d95..bbb745db 100644
--- a/vendor/go.uber.org/zap/field.go
+++ b/vendor/go.uber.org/zap/field.go
@@ -400,6 +400,16 @@ func Object(key string, val zapcore.ObjectMarshaler) Field {
return Field{Key: key, Type: zapcore.ObjectMarshalerType, Interface: val}
}
+// Inline constructs a Field that is similar to Object, but it
+// will add the elements of the provided ObjectMarshaler to the
+// current namespace.
+func Inline(val zapcore.ObjectMarshaler) Field {
+ return zapcore.Field{
+ Type: zapcore.InlineMarshalerType,
+ Interface: val,
+ }
+}
+
// Any takes a key and an arbitrary value and chooses the best way to represent
// them as a field, falling back to a reflection-based approach only if
// necessary.