Zap vs Logrus: source lines of code compared

This page compares the source lines of code (SLOC) of uber-go/zap and sirupsen/logrus using cached OctoCounts reports. Code size is not code quality: a larger count only means more source material, not a better or worse project.

As of 2026-08-26, uber-go/zap contains 25,419 total lines (16,537 code) across 151 files, while sirupsen/logrus contains 9,510 total lines (6,587 code) across 56 files as of 2026-08-26. uber-go/zap is about 2.5x the size of sirupsen/logrus by code lines. Code size is not code quality: a larger count only means more source material, not a better or worse project.

Metricuber-go/zapsirupsen/logrus
Files15156
Total lines25,4199,510
Code lines16,5376,587
Comment lines6,0851,429
Blank lines2,7971,494
Languages counted53

Top languages in uber-go/zap: Go (99.4% of code), Makefile (0.3% of code), YAML (0.2% of code). Top languages in sirupsen/logrus: Go (99.9% of code), YAML (0.1% of code), Markdown (0.0% of code). Go, YAML, Markdown appear in both top language lists; Makefile, Shell appear only in uber-go/zap's top languages.

Methodology: both counts come from cached OctoCounts reports generated with tokei. uber-go/zap was counted at ref master (commit bbd4ecbd8760) on 2026-08-26; sirupsen/logrus was counted at ref master (commit 6d6a132bc033) on 2026-08-26. See the counting methodology for ignored directories and analysis options.

Evidence and next steps:

Note: code size is not code quality. OctoCounts only reports reproducible line counts and makes no claim that either project is better.

Compare FAQ

Which has more lines of code, uber-go/zap or sirupsen/logrus?

uber-go/zap has more code: 16,537 code lines versus 6,587 for sirupsen/logrus, about 2.5x as much, based on cached OctoCounts reports as of 2026-08-26.

Does more source lines of code mean more complexity?

Not necessarily. SLOC measures size, not complexity, quality, or maintainability. A larger codebase can mean more features, more generated or vendored code, more verbose language idioms, or more tests — none of which imply the code is harder to work with. Use SLOC to gauge the scale of what you'd be reading or maintaining, not as a quality signal for uber-go/zap, sirupsen/logrus, or any repository.

How is this comparison calculated?

Methodology: both counts come from cached OctoCounts reports generated with tokei. uber-go/zap was counted at ref master (commit bbd4ecbd8760) on 2026-08-26; sirupsen/logrus was counted at ref master (commit 6d6a132bc033) on 2026-08-26. See the counting methodology for ignored directories and analysis options.

Can I compare a different branch, tag, or commit?

Yes. This page shows the default branch for each repository. Use the interactive comparison tool to pick any public GitHub repository, branch, tag, or commit SHA for both sides and get a fresh side-by-side report.