Skip to content
CAI
Software that uses CAICheck a score

Nebo15/logger_json

65.5

Adequate · 15 November 2026

1.9k

lines of production code

Elixir

primary language

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

LoggerJSON is an Elixir library that provides structured JSON log formatters for various cloud platforms and observability tools. It integrates with Ecto and Plug via telemetry to log database queries and HTTP requests, while supporting runtime log level configuration and sensitive data redaction. The system is built on a modern formatter architecture compatible with Elixir 1.18+ and includes performance benchmarks to measure encoding overhead.

How it got here

2017 — Elixir 1.16+ modernization and telemetry integration

8 changes.

The project underwent a significant modernization to support Elixir 1.16+ and later 1.18+, involving a major dependency overhaul and the removal of legacy tools. New features were introduced, including runtime log level configuration and dedicated telemetry integrations for Ecto and Plug, alongside comprehensive test coverage updates.

2024–2025 — formatter architecture rewrite

6 changes.

The project refactored its internal architecture by replacing legacy logger backends with a new formatter-based system, introducing dedicated modules for various output formats like Datadog, ECS, and Google Cloud. This restructuring aligned the library with modern Elixir and Erlang standards while improving performance and maintainability. Comprehensive test suites and performance benchmarks were added to verify the correctness and efficiency of the new formatter components.

Features

Initial project setup with formatter, license, and documentation

The repository is initialized with a standard Elixir project structure, including a \.formatter.exs\ file for code formatting, a \LICENSE.md\ file adopting the MIT license, and a \\_config.yml\ for Jekyll documentation hosting. The \README.md\ is rewritten to document LoggerJSON as a collection of JSON-based log formatters for various cloud platforms (Basic, Google Cloud, Datadog, Elastic), providing installation instructions for version 7.0 and configuration examples using the new \new/1\ API. Additionally, \.gitignore\ is updated to exclude package tarballs and temporary test files, and \coveralls.json\ is adjusted to stop skipping the \tasks.ex\ file.

(repo-wide) · high confidence

Introduce LoggerJSON module with runtime log level configuration

The library now includes a \LoggerJSON\ module that provides a \configure\_log\_level!/1\ function, allowing users to change the Logger log level at runtime (e.g., via the \LOG\_LEVEL\ environment variable). This complements the existing JSON formatters (Basic, GoogleCloud, Datadog, Elastic) by enabling dynamic log verbosity control without requiring a restart.

lib · high confidence

New Ecto and Plug telemetry integrations with structured JSON logging

This release introduces dedicated modules for structured logging of Ecto database queries and Plug web requests via telemetry. LoggerJSON.Ecto attaches a handler to log query metrics (execution, queue, decode, and total latency) in JSON format, while LoggerJSON.Plug attaches a handler to log HTTP request details (method, path, status, and duration) in JSON format. Both modules support dynamic log levels and are guarded to only load when their respective dependencies (Ecto or Plug) and :telemetry are present, ensuring the library does not crash if these dependencies are missing. Additionally, a new LoggerJSON.Redactor behavior and a built-in RedactKeys implementation allow users to redact sensitive fields from log metadata.

_lib/logger\json · high confidence

Removals

Removed pre-commit hook installation scripts

The project no longer provides scripts to automatically install or manage pre-commit hooks. The \bin/install-git-hooks.sh\ script, which previously created a symbolic link to the hook, and the \bin/hooks/pre-commit.sh\ script itself, which ran tests and linting tools (mix test, coveralls, credo, dogma), have been deleted. Users can no longer use these provided scripts to set up local pre-commit checks.

bin · high confidence

Behavioural changes

Rewrite logger backends to a new formatter architecture

The library has replaced its previous logger backend implementation with a new formatter-based architecture, introducing a \Formatter\ behaviour and dedicated formatter modules for Basic, Datadog, Elastic Common Schema (ECS), and Google Cloud. This change shifts log processing to Erlang's \:logger\ standard formatters, allowing configuration via a \new/1\ function and supporting options like \:encoder\_opts\, \:redactors\, and specific metadata selectors. The new formatters provide structured JSON output tailored to each destination, including improved error reporting for Datadog and Google Cloud, ECS-compliant fields for Elastic, and support for special metadata keys like \:module\ and \:function\ in the Basic formatter.

_lib/logger\json/formatters · high confidence

Rewrite logger backends to formatters

The library has refactored its internal architecture by replacing the previous logger backend implementation with dedicated formatter modules. This change introduces new components in the \lib/logger\_json/formatter\ directory, including \LoggerJSON.Formatter.Code\ for MFA string formatting, \LoggerJSON.Formatter.DateTime\ for RFC3339 UTC time generation, \LoggerJSON.Formatter.Message\ for handling various log message formats (including Elixir 1.19 compatibility), \LoggerJSON.Formatter.Metadata\ for managing metadata selection and exclusion, \LoggerJSON.Formatter.Plug\ for extracting remote IPs from HTTP connections, and \LoggerJSON.Formatter.RedactorEncoder\ for safely encoding and redacting log data. This restructuring aligns the library with Elixir 1.18+ and Erlang 28 requirements while improving performance and maintainability.

_lib/logger\json/formatter · high confidence

Support for Elixir 1.18+ JSON encoder and modernized configuration

The application now supports Elixir 1.18+ by dynamically selecting the \JSON\ module as the encoder for \logger\_json\ when running on that version or later, falling back to \Jason\ for older versions. Additionally, the configuration structure has been modernized to use the \import Config\ syntax, removing legacy \Mix.Config\ usage and cleaning up obsolete linter configurations (Credo, Dogma) to streamline the setup.

config · high confidence

Test coverage

Added JSON logging performance benchmark; Added comprehensive test coverage for JSON log formatters; Added test coverage for Ecto, Plug, and Formatter modules; Added test support utilities for JSON logging and GenServer simulation; Added tests for log level configuration and updated test formatters; Added unit tests for LoggerJSON formatter components.

Dependencies

Major dependency overhaul and Elixir 1.16+ support

The project has been upgraded to require Elixir 1.15.1 or 1.16+, dropping support for older versions. The dependency list has been significantly restructured: legacy tools like Distillery, Confex, Benchfella, and Dogma have been removed, while modern alternatives such as Benchee, StreamData, Castore, and Dialyxir have been added. Core optional dependencies have been updated to align with current ecosystem standards, including Jason (replacing Poison), Plug 1.15+, Ecto 3.11+, Telemetry 1.0, and Decimal. The lockfile reflects these changes with substantial version bumps across the board.

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

Lenses

  • Code Health 99 → 96 (-3.2)
  • Architecture 99 → 98 (-0.5)
  • Maturity 53 → 53 (+0.0)
  • Readiness 60 → 60 (+0.0)
  • Security 96 → 97 (+0.7)
  • Performance 85 → 85 (+0.0)

New (4)

  • Edited copy of a member (1 corresponding lines) (lib/logger_json/formatters/datadog.ex)
  • Edited copy of a member (17 corresponding lines) (lib/logger_json/formatters/datadog.ex)
  • Edited copy of a member (33 corresponding lines) (lib/logger_json/formatters/datadog.ex)
  • Medium CVE: EEF-[CVE redacted] (mix.lock)

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

Nebo15/logger_json 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 15 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 a045c49034cfcd6580465c96000cc41b85af92b1 — 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-3c33c1882dc1.