You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our intention with the strongly-typed field constructors was to make the output obvious and predictable. If you'd like this sort of type-sniffing, zap.Any is probably a better fit.
Depending on where you're ingesting your logs, adding this feature as you've described will break indexing in many systems. For example, ElasticSearch becomes very unhappy if one message contains "error": {"foo": "bar"} and another contains "error": {"foo": 42}, since error.foo now has an inconsistent type. The current implementation of zap.Error goes really far out of its way to accommodate a variety of fancy error packages without introducing any type conflicts.
Would be neat to have structured errors.
The text was updated successfully, but these errors were encountered: