sirupsen/logrus
69.8
Adequate · 24 September 2026
2.8k
lines of production code
Go
primary language
5
measurements over time
What this system is
This system is a Go logging library that provides structured logging capabilities with flexible output routing. It supports bidirectional integration with the standard library's slog ecosystem and enables shipping logs to remote syslog servers or custom I/O destinations. The codebase also includes internal utilities for testing log output and maintains modern Go module dependencies.
Features
Add hook to send logs to custom io.Writer
A new \writer\ hook is available in the \hooks/writer\ package, allowing users to route log entries of specific levels to any object implementing the \io.Writer\ interface. This enables flexible log routing, such as sending warning and error logs to \stderr\ while directing info and debug logs to \stdout\ or other custom destinations.
hooks/writer · high confidence
Add syslog hook for remote log shipping
Users can now send Logrus logs to a syslog server via the new \hooks/syslog\ package. The \SyslogHook\ supports TCP and UDP connections, allows specifying a syslog priority (e.g., LOG\_INFO, LOG\_WARNING), and automatically maps Logrus levels to syslog severity (e.g., Panic/Fatal to Crit, Error to Err, Debug/Trace to Debug). It exposes all log levels by default, but users can override the \Levels()\ method to filter which entries are sent to syslog, enabling different logging thresholds for local vs. remote output.
hooks/syslog · high confidence
Bidirectional adapters between Logrus and slog
Added \hooks/slog\ to bridge the two logging ecosystems: \Handler\ forwards \slog\ records to an existing \logrus.Logger\ (supporting custom level mapping, source reporting, and attribute grouping), while \Hook\ forwards \logrus\ entries to an \slog.Logger\ (preserving caller info and fields). Both adapters include a default level mapping that covers Logrus's Trace through Panic levels, allow custom level mappers via options, and prevent recursive forwarding loops during mixed usage.
hooks/slog · high confidence
Behavioural changes
Logrus v1.10.2 release with dependency and stability updates
This release updates the test dependency \github.com/stretchr/testify\ to v1.12.1, which removes the legacy \gopkg.in/yaml.v3\ dependency. It also includes fixes for a regression in v1.10.0 where \TextFormatter\ could panic on nil or panicking error values, and adds support for function-backed implementations of \error\ as field values.
(repo-wide) · high confidence
Test coverage
Added test package for capturing log entries; New test utility package for structured log assertion.
Dependencies
Initial Go module support with dependency updates
The project now supports Go modules, introducing a go.mod file that sets the Go version to 1.23 and defines direct dependencies on github.com/stretchr/testify v1.12.1 and golang.org/x/sys v0.13.0, along with an indirect dependency on go.yaml.in/yaml/v3 v3.0.5.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 64 → 70 (+5.4)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 91 → 95 (+3.8)
- Architecture 100 → 100 (-0.0)
- Maturity 45 → 46 (+1.1)
- Readiness 68 → 85 (+16.7)
- Security 99 → 99 (+0.3)
Resolved (9)
- Coverage not included — suite not readable by the collector
- Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
- Medium CVE: GO-2025-4006 (go.mod)
- Medium CVE: GO-2026-5024 (go.mod)
- No exposed public API
- Off-boarding risk: anonymized user #1
- Test reliability not included
- The syslog example uses syslog.LOG_INFO but does not mention how to configure different log levels for local vs remote logging (the custom-hook example), which is covered in the body and needs visibility. (hooks/syslog/README.md)
- The writer hooks example uses log.SetOutput(ioutil.Discard) to default logs to nowhere, but the README does not explain how to configure output at all (e.g. Stderr vs Stdout) and whether a non-io.Writer target is supported. (hooks/writer/README.md)
New (8)
- Hotspot: text_formatter.go (text_formatter.go)
- Medium CVE: GO-2025-4006 (go.mod)
- Medium CVE: GO-2026-5024 (go.mod)
- No ADRs found
- No dependency advisory monitoring
- Off-boarding risk: anonymized user #1
- Outdated: golang.org/x/sys
- TodoComment (text_formatter_test.go)
Changes since last survey
- 73 commits — 72 feature/other, 1 fixes
By area
- (repo) — 32 commits
- (root) — 30 commits
- hooks/slog — 11 commits
Notable commits
- fix: Merge pull request #957 from jtnord/fix-763
- change: Do not assume no color on windows.
- change: Merge pull request #1553 from sonnemusk/feat/slog-handler
- change: Merge pull request #1554 from thaJeztah/deprecate_hascaller
- change: Merge pull request #1555 from thaJeztah/fix_benchmarks
- change: Merge pull request #1556 from thaJeztah/refactor_dup
- change: Merge pull request #1557 from thaJeztah/extract_invalidfn
- change: Merge pull request #1558 from thaJeztah/allow_caller_override
- change: Merge pull request #1559 from thaJeztah/remove_levelmapper
- change: Merge pull request #1560 from thaJeztah/slog_rename
- change: Merge pull request #1561 from thaJeztah/slog_levels
- change: Merge pull request #1562 from thaJeztah/deprecate_MutexWrap
- change: Merge pull request #1563 from thaJeztah/fix_example_formatting
- change: Merge pull request #1564 from thaJeztah/panic_at_the_disco
- change: Merge pull request #1565 from thaJeztah/slog_example
- change: Merge pull request #1566 from thaJeztah/slog_caller
- change: Merge pull request #1567 from thaJeztah/slog_no_recursion
- change: Merge pull request #1568 from thaJeztah/update_changelog
- change: Merge pull request #1569 from thaJeztah/slog_noleveler
- change: Merge pull request #1570 from thaJeztah/slog_leveler
- …and 53 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
sirupsen/logrus was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 24 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 6d6a132bc03324d4ceb78e1b927f995d014cda20 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-5f8d0eb43fd7.