swift-log is a logging API for Swift that provides a unified, performant, and ergonomic interface for logging across the Swift ecosystem.
The tool solves the problem of fragmented logging approaches in Swift libraries and applications by offering a standardized API that libraries can adopt without imposing a specific logging backend on their users. It works as an abstraction layer: applications choose which concrete logging backend implementation to use, while libraries depend only on the API itself. This separation allows different parts of a Swift ecosystem to coexist without logging conflicts or duplicate dependencies.
Developers should adopt swift-log if they are building libraries that need logging capabilities or applications that want to standardize logging across multiple dependencies. It suits any Swift project where you want to decouple the logging interface from the implementation details. The tool is explicitly positioned as an API package, meaning you must select a community-maintained logging backend for production use rather than relying on a built-in implementation. The Swift Package Index provides a searchable collection of available backends to help with this choice.
The project maintains both Swift Package Manager and CMake build support, with SPM as the primary development system and CMake available for integrated or mixed build environments. Testing is managed exclusively through Swift Package Manager.