{"id":13461807,"url":"https://github.com/apple/swift-log","last_synced_at":"2026-01-16T11:32:08.994Z","repository":{"id":40401882,"uuid":"170177511","full_name":"apple/swift-log","owner":"apple","description":"A Logging API for Swift","archived":false,"fork":false,"pushed_at":"2025-04-14T10:15:58.000Z","size":834,"stargazers_count":3687,"open_issues_count":30,"forks_count":314,"subscribers_count":61,"default_branch":"main","last_synced_at":"2025-05-07T15:53:48.071Z","etag":null,"topics":["logging","swift-server"],"latest_commit_sha":null,"homepage":"https://apple.github.io/swift-log/","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apple.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-02-11T18:13:17.000Z","updated_at":"2025-05-06T22:28:54.000Z","dependencies_parsed_at":"2023-11-16T23:58:05.837Z","dependency_job_id":"07966fff-6aef-4b3a-b654-48fdb21bbcbe","html_url":"https://github.com/apple/swift-log","commit_stats":{"total_commits":235,"total_committers":84,"mean_commits":"2.7976190476190474","dds":0.7957446808510639,"last_synced_commit":"0e75c43ee4e4532e23a386670bc4ac8077f4ef58"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apple%2Fswift-log","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apple%2Fswift-log/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apple%2Fswift-log/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apple%2Fswift-log/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apple","download_url":"https://codeload.github.com/apple/swift-log/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252989947,"owners_count":21836667,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["logging","swift-server"],"created_at":"2024-07-31T11:00:58.161Z","updated_at":"2026-01-16T11:32:08.987Z","avatar_url":"https://github.com/apple.png","language":"Swift","funding_links":[],"categories":["Swift","Packages","Developer Tools","apple-swift"],"sub_categories":["Logging"],"readme":"# SwiftLog\n\nThis repository contains a logging API implementation for Swift.\nSwiftLog provides a unified, performant, and ergonomic logging API that can be\nadopted by libraries and applications across the Swift ecosystem.\n\n- 📚 **Documentation** and **tutorials** are available on the [Swift Package Index](https://swiftpackageindex.com/apple/swift-log)\n- 🚀 **Contributions** are welcome, please see [CONTRIBUTING.md](CONTRIBUTING.md)\n- 🪪 **License** is Apache 2.0, repeated in [LICENSE.txt](LICENSE.txt)\n- 🔒 **Security** issues should be reported via the process in [SECURITY.md](SECURITY.md)\n- 🔀 **Available Logging Backends**: SwiftLog is an API package - you'll want to\nchoose from the many\n[community-maintained logging backends](#available-log-handler-backends) for production use\n\n## Quick Start\n\nThe following snippet shows how to add SwiftLog to your Swift Package:\n\n```swift\n// swift-tools-version: 6.1\nimport PackageDescription\n\nlet package = Package(\n    name: \"YourApp\",\n    dependencies: [\n        .package(url: \"https://github.com/apple/swift-log\", from: \"1.6.0\")\n    ],\n    targets: [\n        .target(\n            name: \"YourApp\",\n            dependencies: [\n                .product(name: \"Logging\", package: \"swift-log\")\n            ]\n        )\n    ]\n)\n```\n\nThen start logging:\n\n```swift\nimport Logging\n\n// Create a logger\nlet logger = Logger(label: \"com.example.YourApp\")\n\n// Log at different levels\nlogger.info(\"Application started\")\nlogger.warning(\"This is a warning\")\nlogger.error(\"Something went wrong\", metadata: [\"error\": \"\\(error)\"])\n\n// Add metadata for context\nvar requestLogger = logger\nrequestLogger[metadataKey: \"request-id\"] = \"\\(UUID())\"\nrequestLogger.info(\"Processing request\")\n```\n\n## Available log handler backends\n\nThe community has built numerous specialized logging backends.\n\nA great way to discover available log backend implementations is searching the\n[Swift Package Index](https://swiftpackageindex.com/search?query=swift-log)\nfor the `swift-log` keyword.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapple%2Fswift-log","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapple%2Fswift-log","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapple%2Fswift-log/lists"}