wakatime / wakatime-cli

Command line interface used by all WakaTime text editor plugins
https://wakatime.com/plugins
BSD 3-Clause "New" or "Revised" License
297 stars 41 forks source link

Replace logrus by uber-go/zap #1119

Closed gandarez closed 2 weeks ago

gandarez commented 2 weeks ago

This PR replaces the logrus logger by uber-go/zap. According to the benchmarks zap is 1677% faster than logrus.

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 60.18519% with 43 lines in your changes missing coverage. Please review.

Project coverage is 63.14%. Comparing base (b60c4da) to head (490ad2c). Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
pkg/log/log.go 56.66% 26 Missing :warning:
pkg/log/writer.go 12.50% 14 Missing :warning:
pkg/log/context.go 0.00% 3 Missing :warning:
@@             Coverage Diff             @@
##           develop    #1119      +/-   ##
===========================================
+ Coverage    63.10%   63.14%   +0.04%     
===========================================
  Files          384      386       +2     
  Lines        16851    16881      +30     
===========================================
+ Hits         10633    10660      +27     
- Misses        5647     5650       +3     
  Partials       571      571              
Flag Coverage Δ
unittests 63.14% <60.18%> (+0.04%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
cmd/run.go 44.32% <100.00%> (+0.57%) :arrow_up:
pkg/log/option.go 100.00% <100.00%> (ø)
pkg/offline/offline.go 57.29% <100.00%> (ø)
pkg/project/project.go 93.25% <100.00%> (ø)
pkg/remote/remote.go 65.88% <100.00%> (ø)
pkg/log/context.go 0.00% <0.00%> (ø)
pkg/log/writer.go 12.50% <12.50%> (ø)
pkg/log/log.go 50.53% <56.66%> (+11.99%) :arrow_up: