zio/zio-logging
55.2
Adequate · 7 November 2026
5.8k
lines of production code
Scala
with Java
4
measurements over time
What this system is
Features
Add JPL (Java Platform Logger) backend for ZIO logging
Users can now route ZIO logs to the Java Platform Logging API (JPL) via the new \zio.logging.backend.JPL\ module. This backend maps ZIO log levels to JPL levels, supports custom logger names via annotations, and allows formatting customization through \LogFormat\. The implementation includes a default format that excludes the logger name annotation to avoid duplication, and provides layers for easy integration into ZIO runtime environments.
jpl · high confidence
Add JUL bridge example application
An 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 JUL, including configuration for log filters, formatting, and annotation propagation (UserId, TraceId) when bridging JUL log messages into the ZIO logging system.
examples/jul-bridge · high confidence
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. Users can initialize the bridge via ZLayers (with or without FiberRef propagation) and optionally apply log filters by level or configuration, ensuring that JUL log records are captured with correct log levels, spans, and annotations within ZIO.
jul-bridge · high confidence
Add SLF4J 2 backend for ZIO logging
Introduces a new \zio.logging.backend.SLF4J\ module that bridges ZIO logging to SLF4J 2. This backend allows users to register an SLF4J logger via a ZLayer, supporting custom log formats, dynamic logger names based on trace context, and SLF4J markers via annotations. It maps ZIO log levels to SLF4J levels and converts ZIO \Cause\ values to \Throwable\ for proper stacktrace reporting in the underlying logging system.
slf4j2 · 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 SLF4J to route their log calls to the ZIO logging system. StaticLoggerBinder initializes a ZioLoggerFactory as the target logger factory, while StaticMDCBinder provides a BasicMDCAdapter to support Mapped Diagnostic Context operations, enabling standard SLF4J-based libraries to function correctly within a ZIO application.
slf4j-bridge/src/main/java/org/slf4j/impl · high confidence
HTTP API for runtime logger configuration
The examples/core/jvm module now includes a new HTTP API that allows users to view and modify logger configuration at runtime. This feature is implemented through new domain models (ApiDomain), endpoint definitions (ApiEndpoints), and route handlers (ApiHandlers) that expose GET and PUT endpoints for logger settings. The ConfigurableLoggerApp example demonstrates this capability by serving these routes with basic authentication, enabling dynamic adjustment of log levels without restarting the application.
examples/core/jvm · high confidence
Introduce SLF4J bridge to route Java logging to ZIO
The slf4j-bridge module now provides the core implementation classes (ZioLogger, ZioLoggerFactory, StaticMarkerBinder, and LoggerRuntime) required to bridge SLF4J calls into the ZIO logging system. This allows applications using SLF4J to have their log messages automatically captured and processed by ZIO's logging infrastructure.
slf4j-bridge/src/main/scala/org · 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 foundation for ZIO-specific logger implementations. This class implements the core SLF4J logging API (trace, debug, info, warn) with proper argument formatting and throwable handling, delegating actual logging and level checks to abstract methods. This change enables consistent and performant logging behavior across the ZIO ecosystem by providing a reusable template for bridge implementations.
slf4j-bridge/src/main/java/org/slf4j/helpers · high confidence
Introduction of internal JSON logging infrastructure
The \zio.logging.internal\ package now includes \JsonEscape\, \JsonValidator\, and \LogAppender\ to support structured JSON logging. \JsonEscape\ handles character escaping for JSON strings, while \JsonValidator\ provides a lightweight parser to detect if log content is already valid JSON, allowing the logger to preserve it without double-encoding. The \LogAppender\ trait defines the low-level interface for building log entries, with a specific \json\ implementation that manages state for keys, values, and numeric fields, enabling backends to output properly formatted JSON logs.
core/shared/src/main/scala/zio/logging/internal · high confidence
New SLF4J bridge example demonstrating log filtering and annotation propagation
Added a new example application (\Slf4jBridgeExampleApp\) that demonstrates how to integrate ZIO logging with SLF4J. The example shows how to configure log filters to set different log levels for specific logger names (e.g., setting \SLF4J-LOGGER\ to Warning) and how to propagate ZIO log annotations (such as \TraceId\ and \UserId\) into SLF4J log messages using the \Slf4jBridge\ layer.
examples/slf4j2-bridge · high confidence
New SLF4J logging backend for ZIO
This change introduces a new SLF4J backend (\zio.logging.backend.SLF4J\) that allows ZIO applications to route their structured logs to the SLF4J framework. The implementation maps ZIO log levels to corresponding SLF4J methods, supports SLF4J markers via a dedicated annotation key, and integrates with SLF4J's MDC (Mapped Diagnostic Context) for key-value logging. It also handles exception reporting by converting ZIO \Cause\ objects into \Throwable\ instances using \FiberFailure\ to preserve stack traces.
slf4j/src/main · high confidence
New file-based logging layers and configurable log levels
Users can now log directly to files on JVM and Native platforms using new \FileLoggerLayers\ that support both synchronous and asynchronous writing, JSON formatting, and time-based log rolling. The logging system also introduces a \LoggerConfigurer\ service, allowing applications to dynamically adjust log levels for specific loggers or the root logger at runtime without restarting.
core/js, core/jvm-native, examples/core/shared · high confidence
New file-based logging with time-based rolling and structured annotations
Users can now configure file-based logging via \FileLoggerConfig\, which supports a new \TimeBasedRollingPolicy\ that automatically rotates log files by day. The logging system introduces a structured \LogAnnotation\ framework (with built-in \TraceId\, \TraceSpans\, and \UserId\ annotations) and a \LogContext\ for managing these annotations, allowing users to attach typed metadata to log lines. Additionally, \LogFormat\ now provides a DSL for building custom log outputs and includes a \toJsonLogger\ method to easily produce JSON-formatted logs.
repository · high confidence
New logging backend examples for JPL, SLF4J, and SLF4J 2
Added new example applications demonstrating the JPL, SLF4J, and SLF4J 2 logging backends. These examples include configurations for Logback and Log4j2, showcasing features such as custom tracing annotations, parallel user operations with trace IDs, and confidential log markers.
(repo-wide) · high confidence
Repository bootstrapping and tooling configuration
The project has been initialized with essential configuration files to standardize development and CI workflows. This includes setting up the SBT build tool (version 1.7.1), configuring code formatting via Scalafmt (version 3.11.5), and defining static analysis rules in Scalafix. Additionally, the repository now specifies Node.js version 20.9.0 via .nvmrc, configures JVM options for the build process, and establishes automated pull request handling through Mergify. A Contributor License Agreement (CLA) has also been added to the repository root.
(repo-wide) · high confidence
SLF4J 2.x bridge for ZIO logging
This change introduces a new bridge module that allows ZIO applications to use SLF4J 2.x as the logging facade. It provides a \ZioSLF4JServiceProvider\ implementation that routes SLF4J calls to the ZIO logging system, supporting key-value pair annotations and fiber context propagation. Users can now integrate existing SLF4J-based libraries with ZIO's structured logging capabilities.
slf4j2-bridge/src/main · high confidence
Behavioural changes
Logging subsystem overhauled for ZIO 2 with structured filtering and reconfigurable loggers
The logging module has been migrated to support ZIO 2, introducing a new structured logging API. Users can now apply complex, composable filters (supporting AND/OR/NOT logic) to control which log messages are emitted, and configure console output formats and log levels via \ConsoleLoggerConfig\. The update also adds support for reconfigurable loggers that can adapt to configuration changes at runtime, structured log annotations via \logContext\, and metrics tracking for logged events.
core/shared/src/main/scala/zio/logging · high confidence
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
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 SLF4J 2 bridge.
Dependencies
Build infrastructure initialized with SBT 1.13 and ZIO SBT Ecosystem
The project build has been established using SBT 1.13.0 and the ZIO SBT Ecosystem plugins (version 0.8.5), which integrate CI, website publishing, and ecosystem tooling. The build configuration includes Scala Native 0.5.12 support, Scala.js 1.22.0, and binary compatibility checks via sbt-mima-plugin 1.2.1 (comparing against version 2.4.0). Dependency versions are centralized in a new Versions object, specifying libraries such as Logback 1.6.5, SLF4J 2.0.20, ZIO HTTP 3.11.6, and ZIO Config 4.1.0. Additionally, build helpers are provided to skip Scala 3 documentation generation and to manage JPMS module paths.
project · high confidence
Update ZIO to 2.1.26 and Scala to 2.13.18
The build configuration has been updated to use ZIO version 2.1.26 and Scala 2.13.18. This change affects the core library and all logging backends (SLF4J, SLF4J2, JUL bridge, etc.), ensuring compatibility with the latest ZIO ecosystem and Scala 2.13 patch releases.
(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 61 → 55 (-5.4)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 61 → 61 (+0.0)
- Architecture 91 → 89 (-1.4)
- Maturity 52 → 52 (+0.0)
- Readiness 82 → 62 (-19.5)
- Security 66 → 49 (-17.0)
- Performance 80 → 94 (+14.4)
Resolved (2)
- Outdated: ch.qos.logback:logback-classic
- Outdated: org.slf4j:slf4j-api
New (1)
- Dependency hygiene PARTLY measured — sbt declarations read, dependency currency not (Maven Central unreachable)
Changes since last survey
- 4 commits — 4 feature/other, 0 fixes
By area
- project/Versions.scala — 2 commits
- .github/workflows — 1 commit
- project/build.properties — 1 commit
Notable commits
- change: Update logback-classic to 1.6.6 (#1161)
- change: Update sbt, scripted-plugin to 1.13.1 (#1164)
- change: Update scala-java-time, ... to 2.9.0 (#1162)
- change: Update zio-sbt-ci, zio-sbt-ecosystem, ... to 0.8.7 (#1165)
Architecture
- Unchanged — 0 containers · 1 contexts · 0 edges
Written by cca.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 7 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 48d6f4905935247ff41a43498341bbd8ea691242 — the exact code this score is about.
- Scored under rubric-2026.11.2 — 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.3+preprod-5f8314471808.