# apple/swift-log

A Logging API for Swift

Repository: https://github.com/apple/swift-log
Canonical: https://ross.abutalabs.com/products/swift-log
Homepage: https://swiftpackageindex.com/apple/swift-log
Language: Swift
License: Apache-2.0
License Family: permissive
Topics: logging, swift-server
Last push: 2026-08-24T17:24:09+00:00

## Health v2 (maintenance only)
Score: 98/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 96, longevity 100
- inputs: {"age_days": 2760, "days_push": 9, "days_rel": 28, "gap_med": 14, "n_releases_24m": 18}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4043, forks 344 (observed 2026-08-28T04:08:33.546815+00:00)

## What it is
SwiftLog is Apple's logging API package for Swift, providing a unified, performant logging facade that libraries and applications can adopt across the Swift ecosystem. It is an API-only package meant to be paired with community-maintained logging backend implementations (LogHandler) for production use.

## Use cases
- add structured logging to a Swift server application
- standardize logging across Swift libraries and frameworks
- swap logging backends without changing application code
- attach metadata like request IDs to log messages
- log at different levels (info, warning, error) in Swift apps

## When to choose
- you are building Swift server-side or application code and need a standard logging API
- you are a library author who wants consumers to control the logging backend
- you want an SSWG-graduated, Apple-maintained package with broad platform support

## When to avoid
- you need a batteries-included logging implementation with output formatting out of the box
- your project is not in Swift
- you need a specific backend feature that requires using a concrete logging library directly

## Facets
- artifact type: library
- maturity: stable
- function: logging
- domain: developer-tools, backend
- platform: cross-platform, wasm
- tags: swift, swift-server, log-handler, api-package, sswg, serverless, linux, macos, ios

## Member repositories
- apple/swift-log (main) score 98

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:33.546815+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:23:44.762925+00:00, confidence not recorded.
  - readme: https://github.com/apple/swift-log (fetched 2026-08-28T04:08:33.546815+00:00, sha 5b48faca7669)
  - homepage: https://swiftpackageindex.com/apple/swift-log (fetched 2026-08-29T09:16:09.823730+00:00, sha 1f8012243609)
- Data as of 2026-08-30T08:39:29.467469+00:00.
