[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-6919":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":17,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":21,"hasPages":23,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":16,"starSnapshotCount":16,"syncStatus":17,"lastSyncTime":30,"discoverSource":31},6919,"swift-log","apple\u002Fswift-log","apple","A Logging API for Swift","https:\u002F\u002Fswiftpackageindex.com\u002Fapple\u002Fswift-log",null,"Swift",4019,340,59,27,0,2,19,29.6,"Apache License 2.0",false,"main",true,[25,26],"logging","swift-server","2026-06-12 02:01:32","# SwiftLog\n\n[![](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdocc-read_documentation-blue)](https:\u002F\u002Fswiftpackageindex.com\u002Fapple\u002Fswift-log\u002Fdocumentation)\n[![](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fv\u002Frelease\u002Fapple\u002Fswift-log)](https:\u002F\u002Fgithub.com\u002Fapple\u002Fswift-log\u002Freleases)\n[![](https:\u002F\u002Fimg.shields.io\u002Fendpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fapple%2Fswift-log%2Fbadge%3Ftype%3Dswift-versions)](https:\u002F\u002Fswiftpackageindex.com\u002Fapple\u002Fswift-log)\n[![](https:\u002F\u002Fimg.shields.io\u002Fendpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fapple%2Fswift-log%2Fbadge%3Ftype%3Dplatforms)](https:\u002F\u002Fswiftpackageindex.com\u002Fapple\u002Fswift-log)\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:\u002F\u002Fswiftpackageindex.com\u002Fapple\u002Fswift-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](https:\u002F\u002Fgithub.com\u002Fapple\u002Fswift-log?tab=security-ov-file)\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\u002F\u002F swift-tools-version: 6.1\nimport PackageDescription\n\nlet package = Package(\n    name: \"YourApp\",\n    dependencies: [\n        .package(url: \"https:\u002F\u002Fgithub.com\u002Fapple\u002Fswift-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\u002F\u002F Create a logger\nlet logger = Logger(label: \"com.example.YourApp\")\n\n\u002F\u002F Log at different levels\nlogger.info(\"Application started\")\nlogger.warning(\"This is a warning\")\nlogger.error(\"Something went wrong\", metadata: [\"error\": \"\\(error)\"])\n\n\u002F\u002F 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:\u002F\u002Fswiftpackageindex.com\u002Fsearch?query=swift-log)\nfor the `swift-log` keyword.\n","SwiftLog 是一个为 Swift 语言设计的日志记录 API。它提供了一个统一、高效且易于使用的日志接口，适用于 Swift 生态系统中的库和应用程序。核心功能包括支持多种日志级别（如 info, warning, error）以及元数据的添加以增强日志上下文信息。此外，SwiftLog 允许开发者选择不同的社区维护的日志后端实现，以满足特定需求。此项目适合需要在 Swift 应用或库中集成健壮日志系统的开发场景使用。","2026-06-11 03:09:34","top_language"]