roidrage/lograge
70.7
Strong · 28 September 2026
714
lines of production code
Ruby
primary language
2
measurements over time
What this system is
Lograge is a Ruby gem that provides structured logging for Rails applications by replacing default request logs with customizable, machine-readable formats. It supports multiple output styles such as JSON, CEE, and Logstash, and extends instrumentation to cover both standard controller actions and Action Cable WebSocket events. The library is designed for broad compatibility, supporting a wide range of Rails versions and modern Ruby releases, while offering granular configuration options for payload customization and log suppression.
How it got here
2012 — Action Cable support and modernization
6 changes.
This period focused on modernizing the Lograge library by adding native support for Action Cable logging and restructuring the core to improve modularity. The work included updating the development environment with RSpec and RuboCop, refactoring the Railtie initialization, and suppressing default Rails request logs to reduce noise. Additionally, dependencies were updated to ensure compatibility with Rails 6 and modern Ruby versions.
2013–2015 — Structured logging formatters and dev tools
4 changes.
The project expanded its logging capabilities by introducing a variety of new formatters for structured output formats such as CEE, Graylog2, JSON, and Logstash. This feature set was supported by comprehensive test coverage to ensure correct serialization of log payloads. Additionally, a development console tool was added to facilitate interactive debugging and exploration.
2019–2021 — Action Cable logging and Rails compatibility
4 changes.
This period focused on extending Lograge to support structured logging for Action Cable WebSocket events, including channel subscriptions and connection lifecycle. The work also involved expanding the test matrix to validate compatibility across a wide range of Rails versions, from 5.2 through 8.1 and Edge.
Features
Add Action Cable logging support
Lograge now includes a dedicated subscriber for Action Cable, enabling structured logging for WebSocket events such as perform\_action, subscribe, unsubscribe, connect, and disconnect. This new capability captures channel or connection class, action, parameters, and duration, integrating seamlessly with the existing logging framework.
_lib/lograge/log\subscribers · high confidence
Add Action Cable logging support
Lograge now instruments Action Cable events, logging channel subscriptions and unsubscriptions, as well as connection open and close events. This allows users to trace WebSocket activity through their standard logging pipeline.
_lib/lograge/rails\_ext/action\cable · high confidence
Add development console tool
A new executable script \tools/console\ has been added to provide a simple development console. It sets up the Ruby environment, loads the project's Gemfile, and initializes the Pry REPL for interactive debugging and exploration.
tools · high confidence
Major refactoring of Lograge core with new formatters and Action Cable support
The library has been significantly restructured to improve modularity and extend logging capabilities. The core \lib/lograge.rb\ file now explicitly requires and registers a wide range of built-in formatters (including CEE, JSON, Graylog2, KeyValue, LTSV, and Logstash) and dedicated log subscribers for ActionController and Action Cable. This change introduces native support for logging Action Cable events, allowing users to monitor WebSocket connections and channels. Additionally, the configuration API has been expanded to support multiple base controller classes, custom payload methods, and granular ignore conditions, while the setup process now automatically removes existing Rails log subscribers to prevent duplicate logging.
lib · high confidence
New log formatters: CEE, Graylog2, JSON, Lines, Logstash, and LTSV
This change introduces several new formatter classes for structured and specialized log output formats. Users can now format logs as CEE (Common Event Expression), Graylog2 Extended Log Format (GELF), standard JSON, or the Lines format (requiring the \lines\ gem). Additionally, support for Logstash (via \logstash-event\) and LTSV (Labeled Tab Separated Values) has been added, with the LTSV formatter handling special character escaping and float precision. These formatters are located in \lib/lograge/formatters/\ and provide alternative serialization strategies beyond the existing key-value and L2met formats.
lib/lograge/formatters · high confidence
Behavioural changes
Lograge v0.15.0: Modernized Railtie and new utility classes
This release updates the library to version 0.15.0 and refactors the initialization process. The Railtie now explicitly requires Action View and Action Controller log subscribers, configures a dedicated ActiveSupport deprecator for Lograge, and uses an OrderedOptions object for configuration, ensuring setup occurs after initialization. Additionally, two new classes are introduced: Lograge::OrderedOptions, which extends ActiveSupport::OrderedOptions to support a custom\_payload block, and Lograge::SilentLogger, a delegator that suppresses all log output (debug through unknown) for use when logging is disabled.
lib/lograge · high confidence
Standardize development environment with RSpec and RuboCop configuration
The project now includes explicit configuration files for its development toolchain: a \.rspec\ file sets default test output to colorized progress format and requires the spec helper, while a \.rubocop.yml\ file establishes code style rules, excludes vendor and gemspec files from certain metrics, and targets Ruby 2.5. The \Rakefile\ has been updated to define a \ci\ task that runs both RSpec and RuboCop, and \.gitignore\ has been expanded to exclude test coverage and bundler artifacts, ensuring a consistent and automated quality-checking workflow for contributors.
(repo-wide) · high confidence
Suppresses default Rails request logging lines
The library now includes a custom \Rails::Rack::Logger\ extension that overrides Rails' default request logging behavior. Specifically, it suppresses the standard log lines indicating incoming requests (e.g., 'Started GET / for ...') by replacing the \call\_app\ and \before\_dispatch\ methods. This change ensures that only Lograge's structured logs are emitted, reducing noise in the application logs while maintaining compatibility with Rails' internal logging mechanisms.
_lib/lograge/rails\ext/rack · high confidence
Test coverage
Added shared example for key-value formatter; Added test coverage for Lograge configuration and formatter helpers; Added test coverage for new and existing log formatters; Added tests for Action Cable and Action Controller log subscribers.
Dependencies
Expanded test matrix for Rails 5.2 through 8.1 and Edge
The gemfiles in the \gemfiles/\ directory have been updated to include dedicated dependency configurations for testing against Rails versions 5.2, 6.0, 6.1, 7.0, 7.1, 7.2, 8.0, and 8.1, as well as the Rails Edge version. This ensures the library is validated against a comprehensive range of supported and upcoming Rails releases, with specific gems like \actionpack\ and \activerecord\ pinned to their respective version constraints or sourced directly from the Rails repository for the edge build.
gemfiles · high confidence
Update dependencies and runtime requirements for Rails 6 and Ruby 3.4 compatibility
The gem's dependencies and runtime requirements have been updated to support Rails 6 and modern Ruby versions. Runtime dependencies now explicitly include \actionpack\, \activesupport\, \railties\ (all \>= 4), \logger\, and \request\_store\ (\~\> 1.0). Development dependencies have been expanded to include \base64\, \benchmark\, \bigdecimal\, \mutex\_m\, \rdoc\ (\< 8), \rspec\ (\~\> 3.1), \rubocop\ (\~\> 1.23), and \simplecov\ (\~\> 0.21) to address changes in Ruby 3.4/4.1 default gems and ensure JRuby compatibility. The test environment now uses \actionpack\ and \activerecord\ \~\> 6, and \logstash-event\ is pinned to tag v1.5.4 via git.
(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
This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.
Score
- CAI 66 → 71 (+5.0)
- Rubric changed (rubric-2026.09.8 → rubric-2026.09.16) — scores are not directly comparable.
Lenses
- Code Health 99 → 99 (-0.0)
- Architecture 69 → 69 (+0.0)
- Maturity 49 → 59 (+10.3)
- Readiness 90 → 90 (+0.0)
- Security 94 → 95 (+1.5)
Resolved (4)
- Documentation: no usage examples (README.md)
- High: security finding (details withheld)
- High: security finding (details withheld)
- Orphaned files with no living knowledge
New (6)
- Fragmented and inconsistent naming for ignore/subscription management. ignore_actions and ignore suggest different mechanisms but likely configure the same underlying ignore list. ignore? is a predicate while others are mutators. set_ignores is ambiguous (does it replace? append?). ignore_nothing is a specific state reset.
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- Inconsistent verb usage for setup/integration methods. attach_to_ implies a passive connection, whereas setup (used in Lograge.setup(app)) implies initialization. Other methods use set_ or direct verbs. The distinction between 'attaching' and 'setting up' is unclear.
Changes since last survey
- 5 commits — 3 feature/other, 2 fixes
By area
- (repo) — 2 commits
- (root) — 2 commits
- .github/workflows — 1 commit
Notable commits
- fix: Merge pull request #405 from roidrage/ci/fix-json3-and-rubocop
- fix: ci: fix pre-existing failures from json 3.x and RuboCop 1.91
- change: Add 'logger' as dependency in gemspec
- change: Merge pull request #401 from leoarnold/leoarnold/gemspec
- change: ci: run RuboCop once instead of across the whole matrix
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
roidrage/lograge 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 28 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 d0b1df58efdd85ae2574f575f73e76f03a97befa — the exact code this score is about.
- Scored under rubric-2026.09.16 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-2d9048c36d26.