matrix-org/dendrite

Move to zerolog

开放

#1,468 创建于 2020年10月2日

 (12 条评论) (4 个反应) (0 位负责人)Go (658 个派生)auto 404
T-TaskX-Performancegood first issue

仓库指标

星标
 (5,632 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

We should move to use https://github.com/uber-go/zap or https://github.com/rs/zerolog instead of logrus because logrus does a loooooot of allocations, far more than the rest of Dendrite. I'd propose we use the sugared one since we're not looking for any specific improvement other than "why is logging consuming so much time/allocs". In terms of numbers:

  • logrus 29501 ns/op
  • zap 1250 ns/op (~24x speedup)

Allocations:

  • logrus 125 allocs/op
  • zap 11 allocs/op

贡献者指南