Skip to content
CAI
Software that uses CAICheck a score

roidrage/lograge

65.5

Adequate · 14 November 2026

721

lines of production code

Ruby

primary language

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a Ruby gem that provides structured logging for Rails applications by replacing default log output with customizable, machine-readable formats. It supports multiple serialization strategies such as JSON, Logstash, and CEE, and integrates with Action Cable to capture WebSocket events. The library allows developers to suppress noisy default logs while maintaining the option to keep original Rails logs, ensuring compatibility across a wide range of Rails versions.

How it got here

2012 — v0.15.0 release and modernization

6 changes.

This period focused on the v0.15.0 release, introducing Action Cable support, multiple new log formatters, and a refactored Railtie initialization process. The work also included suppressing default Rails request logging to reduce noise and updating dependencies for Rails 6 and Ruby 3.4 compatibility. Development tooling was standardized with RSpec and RuboCop configurations to ensure consistent code quality.

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

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

Major refactoring of Lograge core with new formatters and Action Cable support

The library has been significantly restructured to support a wider range of logging formats and integration points. Users can now choose from multiple built-in formatters including JSON, Logstash, Graylog2, LTSV, and KeyValue, in addition to the existing Lograge and CEE formats. The core module now exposes configuration options for custom payload methods, before-format hooks, and granular event ignoring (via controller/action strings or custom lambdas). A key behavioral addition is native support for Action Cable logging, which attaches subscribers to Action Cable channels and connections when the framework is present. The setup process has been centralized to handle these attachments, formatter selection, and ignore conditions, while also allowing users to keep the original Rails log alongside the formatted output.

lib · 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 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 66 → 66 (-0.3)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 75 → 73 (-1.9)
  • Architecture 69 → 69 (+0.0)
  • Maturity 54 → 54 (+0.0)
  • Readiness 91 → 91 (+0.0)
  • Security 96 → 95 (-1.6)

Resolved (1)

  • Low CVE: [GHSA redacted] (Gemfile)

New (1)

  • High CVE: [GHSA redacted] (Gemfile)

Written by cca.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 14 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 106e8333d65d35d013f728af81e9a938cafd9f7b — the exact code this score is about.
  • Scored under rubric-2026.11.4 — 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.65+preprod-e1a3b69fc8ee.