Skip to content
CAI
Software that uses CAICheck a score

zio/zio-logging

64.6

Adequate · 20 September 2026

5.8k

lines of production code

Scala

with Java

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

This system is a structured logging library for the ZIO 2 ecosystem that provides a unified API for console, file, and JSON logging across JVM, JavaScript, and Native platforms. It enables runtime reconfiguration of log levels and supports structured annotations to attach contextual metadata like trace IDs to log messages. The library also includes bridges to integrate with external logging frameworks, specifically routing calls to and from SLF4J (v1 and v2), Java Util Logging, and Java Platform Logger.

How it got here

2019–2021 — ZIO 2 migration and SLF4J bridge

10 changes.

The project migrated its core logging infrastructure to support ZIO 2, introducing reconfigurable loggers, structured annotations, and file rolling capabilities. Concurrently, a new SLF4J bridge module was implemented to route existing SLF4J-based logging to the ZIO system, accompanied by comprehensive tests and performance benchmarks.

2022–2023 — SLF4J and JPL logging bridge development

10 changes.

This period focused on implementing and refining logging bridges for SLF4J (including version 2.x) and the Java Platform Logger (JPL) to integrate ZIO's structured logging capabilities with standard Java logging frameworks. Key work included propagating ZIO fiber context and annotations to downstream loggers, establishing internal JSON logging infrastructure, and adding comprehensive test coverage and example applications for these new backends.

2024 — JUL bridge and file logging support

4 changes.

This period focused on extending the logging library's interoperability and persistence capabilities by introducing a Java Util Logging bridge and platform-specific file logging for JVM and Native targets. The work also included enhancing runtime configurability through an HTTP management API, demonstrated via new example applications that showcase log filtering, formatting, and dynamic level adjustments.

Features

Add Java Util Logging bridge for ZIO

The jul-bridge module now provides a bridge that routes java.util.logging calls into ZIO's logging system. This allows applications using legacy Java logging to have their log messages captured, filtered, and enriched with ZIO context (such as spans and annotations) via the JULBridge initialization layers.

jul-bridge · high confidence

Add file logging support for JVM and Native platforms

The logging library now includes platform-specific file logging capabilities for JVM and Native targets. Users can configure and install loggers that write to files via new \FileLoggerLayers\, supporting both synchronous and asynchronous modes, JSON and plain text formats, and time-based log rolling. This change introduces the necessary internal \FileWriter\ and configuration loading logic to enable persistent log storage on these platforms.

core/js, core/jvm-native, examples/core/shared · high confidence

Added JUL bridge example application

A new example application demonstrating the Java Util Logging (JUL) bridge has been added to the examples/jul-bridge directory. This sample shows how to integrate ZIO logging with java.util.logging, including configuration for log filters, formatting, and annotation extraction (UserId, TraceId) within a ZIO application.

examples/jul-bridge · high confidence

Added SLF4J bridge implementation for ZIO logging

The slf4j-bridge module now includes the core SLF4J binding classes (StaticLoggerBinder and StaticMDCBinder) that allow applications using the SLF4J API to route their log output to the ZIO logging system. This enables seamless integration of existing SLF4J-based libraries with ZIO's logging infrastructure.

slf4j-bridge/src/main/java/org/slf4j/impl · high confidence

Initial project setup and documentation

The repository has been initialized with the core build infrastructure, including an sbt launcher script (version 1.7.1), configuration files for code formatting (scalafmt 3.11.5), linting (scalafix), and JVM options. It also establishes the Node.js environment (version 20.9.0 via .nvmrc) and includes a Contributor License Agreement (CLA). The README has been updated to comprehensively document the library's features, installation instructions for various backends (SLF4J, JPL, JUL), and usage examples.

(repo-wide) · high confidence

Introduction of ZioLoggerBase for SLF4J bridge implementation

The slf4j-bridge module now includes a new abstract base class, ZioLoggerBase, which extends SLF4J's MarkerIgnoringBase to provide a standardized implementation for ZIO-specific logging. This class implements the core SLF4J logging API methods (trace, debug, info, warn) and level-checking methods, delegating the actual logging logic to abstract methods that allow subclasses to integrate with ZIO's runtime. This change establishes the foundational component for the SLF4J bridge, enabling proper logger naming and direct logging capabilities as indicated by related commit messages.

slf4j-bridge/src/main/java/org/slf4j/helpers · high confidence

New SLF4J 2 Bridge example application

An example application demonstrating the ZIO SLF4J 2 bridge has been added to the examples directory. This sample shows how to initialize the bridge, configure log filtering by logger name, and propagate ZIO log annotations (such as TraceId and UserId) to SLF4J loggers.

examples/slf4j2-bridge · high confidence

New SLF4J 2.x bridge for ZIO logging

This release introduces a new \slf4j2-bridge\ module that allows ZIO applications to act as the underlying logging provider for the SLF4J 2.x API. By implementing the \SLF4JServiceProvider\ interface and registering via Java SPI, the bridge intercepts standard SLF4J logging calls and routes them through ZIO's native logging infrastructure. This enables users to leverage ZIO's structured logging capabilities, such as fiber context propagation, log filtering, and key-value annotations, for libraries and frameworks that depend on SLF4J.

slf4j2-bridge/src/main · high confidence

New configurable logging example with HTTP management API

The JVM examples now include a ConfigurableLoggerApp that demonstrates runtime logger configuration via a Typesafe Config file (logger.conf) and exposes an HTTP API for managing log levels. This API, implemented in ApiEndpoints and ApiHandlers, allows users to retrieve and update logger configurations via GET and PUT requests to /example/logger endpoints, protected by basic authentication. The example also includes supporting components like a PingService for demonstration purposes, along with comprehensive tests for the API endpoints and handlers.

examples/core/jvm · high confidence

New example applications for JPL and SLF4J logging backends

Added new example applications demonstrating the JPL and SLF4J logging backends, including simple apps, custom tracing annotation examples, and failure handling scenarios. These examples also include configuration files for Logback and Log4j2, showcasing how to integrate ZIO logging with these popular Java logging frameworks.

(repo-wide) · high confidence

New internal JSON logging infrastructure

The logging subsystem now includes new internal components to support structured JSON logging: \JsonEscape\ handles character escaping for JSON strings, \JsonValidator\ provides lightweight validation to detect if text content is already valid JSON, and \LogAppender\ defines the low-level interface for appending structured log data (including numeric values, key-value pairs, and causes) with a specific JSON implementation that manages state for building JSON output.

core/shared/src/main/scala/zio/logging/internal · high confidence

New structured logging core with file rolling and configurable backends

The logging library has been overhauled to support structured logging with a new DSL for defining log formats (LogFormat), filtering (LogFilter), and annotations (LogAnnotation). This change introduces built-in support for time-based rolling file logs via the new FileLoggerConfig and WriterProvider, allowing log files to automatically rotate by day. It also adds a Java Platform Logger (JPL) backend, a JSON console logger example, and reconfigurable loggers that allow runtime adjustment of log levels. Users can now configure logging via ZIO Config layers for both console and file outputs, with support for custom colors, log levels, and structured data extraction.

repository · high confidence

SLF4J bridge implementation for ZIO logging

The slf4j-bridge module now provides the core implementation classes required to bridge SLF4J calls to ZIO logging. This includes the ZioLoggerFactory and ZioLogger classes that handle logger instantiation and log dispatch, a StaticMarkerBinder to satisfy SLF4J's marker factory binding requirements, and a LoggerRuntime trait that defines the interface for actual log execution. This change enables applications using SLF4J to have their logging routed through the ZIO logging infrastructure.

slf4j-bridge/src/main/scala/org · high confidence

Behavioural changes

SLF4J bridge now propagates ZIO fiber context and annotations to SLF4J loggers

The slf4j-bridge module introduces a new initialization layer that bridges ZIO logging to SLF4J while preserving ZIO's fiber-local context. When SLF4J loggers are invoked, the bridge now captures the current ZIO fiber's FiberRefs, specifically propagating the current log span and log annotations into the SLF4J logging call. This ensures that structured logging metadata managed by ZIO (such as spans and key-value annotations) is visible in downstream SLF4J destinations, aligning SLF4J output with ZIO's contextual logging model.

slf4j-bridge/src/main/scala/zio · high confidence

ZIO Logging overhauled for ZIO 2 with reconfigurable loggers and structured annotations

The logging module has been migrated to support ZIO 2, introducing a new architecture for logger layers and configuration. Users can now utilize \ReconfigurableLogger\ to dynamically update logging behavior and configuration at runtime without restarting the application. The update also adds structured log annotations via \logContext\ and \loggerName\ aspects, allowing developers to attach contextual metadata (such as user IDs or request traces) to log messages. Additionally, new layer-based APIs in \LoggerLayers\ simplify the setup of console, JSON, and metric-enabled loggers, while \logMetrics\ provides built-in counters for tracking log volume by level.

core/shared/src/main/scala/zio/logging · high confidence

Test coverage

Added logging filter performance benchmarks; Added test suite for ZIO logging module; Added tests and example app for the SLF4J bridge; Added tests for SLF4J logging backend configuration and output verification; Added tests for the JPL logging backend; Added tests for the SLF4J 2 bridge; Added tests for the SLF4J v2 logging backend.

Dependencies

Build infrastructure restructured with ZIO SBT Ecosystem and updated tooling

The project's build configuration has been reorganized into dedicated Scala files (BuildHelper, MimaSettings, Versions) and updated to use SBT 1.13.0. The build now integrates the ZIO SBT Ecosystem (version 0.8.0), which includes plugins for CI, website generation, and ecosystem management. Key dependency versions are centralized in Versions.scala, including Scala Native 0.5.12, Scala.js 1.22.0, and ZIO HTTP 3.11.5. Binary compatibility checking is configured via sbt-mima-plugin 1.2.0, comparing against version 2.4.0.

project · high confidence

Upgrade ZIO to 2.1.26 and update build infrastructure

The project's build configuration has been updated to use ZIO version 2.1.26, along with Scala 2.13.18. The build system now integrates the ZIO SBT Ecosystem Plugin and CI Plugin, configuring continuous integration to run on Ubuntu 22.04. Additionally, the \slf4j2Bridge\ module now explicitly depends on \scala-collection-compat\ version 2.8.1, and the \slf4j2\ module uses \logstash-logback-encoder\ version 9.0 for testing.

(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

Baseline

  • First survey — no prior run to compare against. CAI 65.

Lenses

  • Code Health 95
  • Architecture 98
  • Maturity 54
  • Readiness 78
  • Security 62

Changes since last survey

  • 300 commits — 296 feature/other, 4 fixes

By area

  • (root) — 99 commits
  • project/Versions.scala — 96 commits
  • project/build.properties — 38 commits
  • project/plugins.sbt — 28 commits
  • .github/workflows — 15 commits
  • core/shared — 10 commits
  • examples/core — 4 commits
  • core/jvm — 2 commits
  • slf4j-bridge/src — 2 commits
  • slf4j2-bridge/src — 2 commits
  • docs/formatting-log-records.md — 1 commit
  • docs/reconfigurable-logger.md — 1 commit
  • jul-bridge/src — 1 commit
  • slf4j/src — 1 commit

Notable commits

  • fix: ConfigurableLoggerApp - configurableLogger fix (#1034)
  • fix: Fix README generation (#852)
  • fix: readme - fix contributing and code of conduct links (#813)
  • fix: zio 2.1.14, test fixes (#922)
  • change: Add appendLoggerName aspect (#893)
  • change: Copyright update, zio-sbt update (#1005)
  • change: Implement java.util.logging bridge (#849)
  • change: Re-Configurable loggers (#736)
  • change: Update README.md (#1030)
  • change: Update README.md (#1051)
  • change: Update README.md (#758)
  • change: Update README.md (#786)
  • change: Update README.md (#793)
  • change: Update README.md (#804)
  • change: Update README.md (#807)
  • change: Update README.md (#812)
  • change: Update README.md (#823)
  • change: Update README.md (#877)
  • change: Update README.md (#898)
  • change: Update README.md (#907)
  • …and 280 more

Architecture

  • 0 containers · 1 bounded contexts · 0 dependency edges (baseline)

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

Survey your own repository

zio/zio-logging 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 20 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 dc4126c38f2e548736c75c60567547eb0c2b5811 — 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-b51f968c9b10.