Lazy fields
未关闭
- 主要语言
- Go
- 星标
- 1.4k
- 派生
- 110
- PR 合并指标
- 30 天内没有已合并 PR
描述
It would be nice to have an optional ``WithLazyFields(key string, func() interface{})`` method to calculate field value only when it's retrieved with ``Get(key string)`` method.
I.e. some entries may be discarded due to log level, but they are still evaluated.
A real life example is dumping http requests/responses on debug level. It requires much more memory for each request to process, and it's painful to have some debug switches to turn it on/off on local/production system.
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。