erlang-lager/lager
60.1
Adequate · 13 November 2026
8.4k
lines of production code
Erlang
primary language
8
measurements over time
What this system is
This system is a structured logging library for Erlang applications, designed to replace or augment the standard error\_logger. It provides a macro-based API for attaching structured metadata to log messages and supports runtime configuration, message throttling, and log rotation. The codebase includes comprehensive test coverage for features like record compression, crash handling, and log formatting.
Features
Added CSS styling for edoc documentation pages
A new stylesheet (priv/edoc.css) has been added to style the generated EDoc documentation. This introduces a consistent visual theme for the documentation, including typography, spacing, and color accents (e.g., orange highlights for headers and function titles), improving the readability and appearance of the generated HTML pages.
priv · medium confidence
Introduce error\_logger redirection and runtime configuration infrastructure
Adds the \error\_logger\_lager\_h\ module to intercept and redirect Erlang's \error\_logger\ events into the Lager logging system, allowing users to seamlessly migrate from the legacy error logger. The commit also introduces \lager\_config\ for managing runtime configuration, \lager\_backend\_throttle\ for mailbox-based message throttling, and a \lager\_common\_test\_backend\ to facilitate testing by capturing log output. These changes enable more robust error handling, configurable high-water mark shaper, and improved testability for applications using Lager.
src · high confidence
Behavioural changes
Lager logging macros now include structured metadata and support unsafe logging
The \lager.hrl\ header file was added, introducing a new macro-based logging API that automatically attaches structured metadata (such as process ID, node, module, function, and line number) to all log messages. This change separates formatting from backend delivery and introduces \\_unsafe\ variants of the logging macros (e.g., \lager\_info\_unsafe\) that bypass message truncation limits, allowing users to log large messages without size restrictions. Additionally, the header defines bitmasks for log levels and a shaper record to manage message flow control.
include · medium confidence
Refactor build system and update documentation
The project's build system has been refactored by introducing a shared \tools.mk\ Makefile and updating the \Makefile\ to use it, while also adding a \rebar.config.script\ to handle Rebar 2/3 compatibility and dependency pinning. Documentation has been migrated from Org-mode (\README.org\) to Markdown (\README.md\), and a \.gitignore\ file has been added to exclude build artifacts and local configuration files.
(repo-wide) · high confidence
Test coverage
Added tests for record compression, crash handling, metadata whitelisting, and log rotation
Added a suite of EUnit tests to the test/ directory, including compress\_pr\_record\_test.erl for verifying record compression, crash.erl/crash\_fsm.erl/crash\_statem.erl for simulating various process and state machine failures, lager\_metadata\_whitelist\_test.erl for validating metadata filtering, and lager\_rotate.erl for testing log file rotation. Additionally, new test modules were introduced for the manager killer (lager\_manager\_killer\_test.erl), function transforms (lager\_test\_function\_transform.erl), tracing (lager\_trace\_test.erl), stacktrace formatting (pr\_stacktrace\_test.erl), and QuickCheck validation of the truncator (trunc\_io\_eqc.erl).
test · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 60 → 60 (+0.0)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.3) — scores are not directly comparable.
Lenses
- Code Health 70 → 70 (+0.0)
- Architecture 100 → 100 (+0.0)
- Maturity 43 → 43 (+0.0)
- Readiness 68 → 68 (+0.0)
- Security 85 → 85 (+0.0)
- Event Sourcing 100 → 100 (+0.0)
New (7)
- Edited copies of one member (3 members, 4+ corresponding lines) (src/lager.erl)
- Edited copy of a member (11 corresponding lines) (src/lager_trunc_io.erl)
- Edited copy of a member (13 corresponding lines) (src/lager_util.erl)
- Edited copy of a member (3 corresponding lines) (src/lager.erl)
- Edited copy of a member (5 corresponding lines) (src/lager_crash_log.erl)
- Edited copy of a member (9 corresponding lines) (src/lager_format.erl)
- Edited copy of a member (9 corresponding lines) (src/lager_format.erl)
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
erlang-lager/lager 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 13 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit e6b31784e65b838a10d0a533f4b838da8029e402 — the exact code this score is about.
- Scored under rubric-2026.11.3 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.57+preprod-8ebfb01cf4c0.