[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-6794":3},{"id":4,"name":5,"fullName":6,"owner":5,"repo":5,"description":7,"homepage":8,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":15,"stars30d":16,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":17,"rankGlobal":9,"rankLanguage":9,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":9,"pushedAt":9,"updatedAt":34,"readmeContent":35,"aiSummary":36,"trendingCount":15,"starSnapshotCount":15,"syncStatus":37,"lastSyncTime":38,"discoverSource":39},6794,"SwiftyBeaver","SwiftyBeaver\u002FSwiftyBeaver","Convenient & secure logging during development & release in Swift 4 & 5","https:\u002F\u002Fswiftybeaver.com",null,"Swift",6067,496,65,7,0,1,39.09,"MIT License",false,"master",true,[23,24,25,26,27,28,29,30,31,32,33],"apple-tv","ios","logging","macos","server-side-swift","swift","swift-framework","swift4","swift5","swiftybeaver-platform","vapor","2026-06-12 02:01:30","\u003Cp align=\"center\">\u003Cb>Colorful\u003C\u002Fb>, flexible, \u003Cb>lightweight\u003C\u002Fb> logging for Swift 3, Swift 4 & \u003Cb>Swift 5\u003C\u002Fb>.\u003Cbr\u002F>Great for \u003Cb>development & release\u003C\u002Fb> with support for Console, file & cloud destinations for server-side Swift.\u003C\u002Fp>\n\n\u003Cp align=\"center\">\u003Ca href=\"https:\u002F\u002Fswift.org\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLanguage-Swift%203,%204%20&%205-orange.svg\" alt=\"Language Swift 2, 3, 4 & 5\">\u003C\u002Fa> \u003Ca href=\"https:\u002F\u002Fcircleci.com\u002Fgh\u002FSwiftyBeaver\u002FSwiftyBeaver\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Fcircleci.com\u002Fgh\u002FSwiftyBeaver\u002FSwiftyBeaver\u002Ftree\u002Fmaster.svg?style=shield\" alt=\"CircleCI\"\u002F>\u003C\u002Fa>\u003Cbr\u002F>\u003Cp>\n\n---\n\n\u003Cbr\u002F>\n\n### During Development: Colored Logging to Xcode Console via OSLog API or Print\n\n\u003Cimg width=\"924\" alt=\"image\" src=\"https:\u002F\u002Fgithub.com\u002FSwiftyBeaver\u002FSwiftyBeaver\u002Fassets\u002F15070906\u002F418a6a70-ced4-4000-91c3-8dc8fc235b7c\">\n\n\n#### In Xcode 15\n```Swift\n\n\u002F\u002F use Apple's fancy OSLog API:\nlet console = ConsoleDestination()\nconsole.logPrintWay = .logger(subsystem: \"Main\", category: \"UI\")\n\n\u002F\u002F or use good ol' \"print\" (which is the default):\nlet console = ConsoleDestination()\nconsole.logPrintWay = .print\n```\n#### In Xcode 8\n[Learn more](http:\u002F\u002Fdocs.swiftybeaver.com\u002Farticle\u002F9-log-to-xcode-console) about colored logging to Xcode 8 Console with Swift 3, 4 & 5. For Swift 2.3 [use this Gist](https:\u002F\u002Fgist.github.com\u002Fskreutzberger\u002F7c396573796473ed1be2c6d15cafed34). **No need to hack Xcode 8 anymore** to get color. You can even customize the log level word (ATTENTION instead of ERROR maybe?), the general amount of displayed data and if you want to use the 💜s or replace them with something else 😉\n\n\u003Cbr\u002F>\n\n### During Development: Colored Logging to File\n\n\u003Cimg src=\"https:\u002F\u002Fcloud.githubusercontent.com\u002Fassets\u002F564725\u002F18608325\u002Fb7ecd4c2-7ce6-11e6-829b-7f8f9fe6ef2f.png\" width=\"738\">\n\n[Learn more](http:\u002F\u002Fdocs.swiftybeaver.com\u002Farticle\u002F10-log-to-file) about logging to file which is great for Terminal.app fans or to store logs on disk.\n\n\u003Cbr\u002F>\n\n### Google Cloud & More\n\nYou can fully customize your log format, turn it into JSON, or create your own destinations. For example, our [Google Cloud Destination](https:\u002F\u002Fgithub.com\u002FSwiftyBeaver\u002FSwiftyBeaver\u002Fblob\u002Fmaster\u002FSources\u002FGoogleCloudDestination.swift) is just another customized logging format that adds the powerful functionality of automatic server-side Swift logging when hosted on Google Cloud Platform.\n\n\u003Cbr\u002F>\n\n---\n\n\u003Cbr\u002F>\n\u003Cbr\u002F>\n\n## Installation\n\n- For **Swift 4 & 5** install the latest SwiftyBeaver version\n- For **Swift 3** install SwiftyBeaver 1.8.4\n- For **Swift 2** install SwiftyBeaver 0.7.0\n\n\u003Cbr\u002F>\n\n### Carthage\n\nYou can use [Carthage](https:\u002F\u002Fgithub.com\u002FCarthage\u002FCarthage) to install SwiftyBeaver by adding that to your Cartfile:\n\nSwift 4 & 5:\n\n```Swift\ngithub \"SwiftyBeaver\u002FSwiftyBeaver\"\n```\n\nSwift 3:\n\n```Swift\ngithub \"SwiftyBeaver\u002FSwiftyBeaver\" ~> 1.8.4\n```\n\nSwift 2:\n\n```Swift\ngithub \"SwiftyBeaver\u002FSwiftyBeaver\" ~> 0.7\n```\n\n\u003Cbr\u002F>\n\n### Swift Package Manager\n\nFor [Swift Package Manager](https:\u002F\u002Fswift.org\u002Fpackage-manager\u002F) add the following package to your Package.swift file. Just Swift 4 & 5 are supported:\n\n```Swift\n.package(url: \"https:\u002F\u002Fgithub.com\u002FSwiftyBeaver\u002FSwiftyBeaver.git\", .upToNextMajor(from: \"2.0.0\")),\n```\n\n\u003Cbr\u002F>\n\n### CocoaPods\n\nTo use [CocoaPods](https:\u002F\u002Fcocoapods.org) just add this to your Podfile:\n\nSwift 4 & 5:\n\n```Swift\npod 'SwiftyBeaver'\n```\n\nSwift 3:\n\n```Ruby\ntarget 'MyProject' do\n  use_frameworks!\n\n  # Pods for MyProject\n  pod 'SwiftyBeaver', '~> 1.8.4'\nend\n```\n\nSwift 2:\n\n```Ruby\ntarget 'MyProject' do\n  use_frameworks!\n\n  # Pods for MyProject\n  pod 'SwiftyBeaver', '~> 0.7'\nend\n\npost_install do |installer|\n  installer.pods_project.build_configurations.each do |config|\n    # Configure Pod targets for Xcode 8 with Swift 2.3\n    config.build_settings['SWIFT_VERSION'] = '2.3'\n  end\nend\n```\n\n\u003Cbr\u002F>\n\u003Cbr\u002F>\n\n## Usage\n\nAdd that near the top of your `AppDelegate.swift` to be able to use SwiftyBeaver in your whole project.\n\n```Swift\nimport SwiftyBeaver\nlet log = SwiftyBeaver.self\n\n```\n\nAt the beginning of your `AppDelegate:didFinishLaunchingWithOptions()` add the SwiftyBeaver log destinations (console, file, etc.), optionally adjust the [log format](http:\u002F\u002Fdocs.swiftybeaver.com\u002Farticle\u002F20-custom-format) and then you can already do the following log level calls globally:\n\n```Swift\n\u002F\u002F add log destinations. at least one is needed!\nlet console = ConsoleDestination()  \u002F\u002F log to Xcode Console\nlet file = FileDestination()  \u002F\u002F log to default swiftybeaver.log file\n\n\u002F\u002F use custom format and set console output to short time, log level & message\nconsole.format = \"$DHH:mm:ss$d $L $M\"\n\u002F\u002F or use this for JSON output: console.format = \"$J\"\n\n\u002F\u002F In Xcode 15, specifying the logging method as .logger to display color, subsystem, and category information in the console.(Relies on the OSLog API)\nconsole.logPrintWay = .logger(subsystem: \"Main\", category: \"UI\")\n\u002F\u002F If you prefer not to use the OSLog API, you can use print instead.\n\u002F\u002F console.logPrintWay = .print \n\n\u002F\u002F add the destinations to SwiftyBeaver\nlog.addDestination(console)\nlog.addDestination(file)\n\n\u002F\u002F Now let’s log!\nlog.verbose(\"not so important\")  \u002F\u002F prio 1, VERBOSE in silver\nlog.debug(\"something to debug\")  \u002F\u002F prio 2, DEBUG in green\nlog.info(\"a nice information\")   \u002F\u002F prio 3, INFO in blue\nlog.warning(\"oh no, that won’t be good\")  \u002F\u002F prio 4, WARNING in yellow\nlog.error(\"ouch, an error did occur!\")  \u002F\u002F prio 5, ERROR in red\n\n\u002F\u002F log anything!\nlog.verbose(123)\nlog.info(-123.45678)\nlog.warning(Date())\nlog.error([\"I\", \"like\", \"logs!\"])\nlog.error([\"name\": \"Mr Beaver\", \"address\": \"7 Beaver Lodge\"])\n\n\u002F\u002F optionally add context to a log message\nconsole.format = \"$L: $M $X\"\nlog.debug(\"age\", context: 123)  \u002F\u002F \"DEBUG: age 123\"\nlog.info(\"my data\", context: [1, \"a\", 2]) \u002F\u002F \"INFO: my data [1, \\\"a\\\", 2]\"\n\n```\n\nAlternatively, if you are using SwiftUI, consider using the following setup:\n\n```swift\nimport SwiftyBeaver\nlet logger = SwiftyBeaver.self\n\n@main\nstruct yourApp: App {\n\n    init() {\n        let console = ConsoleDestination()\n        logger.addDestination(console)\n        \u002F\u002F etc...\n    }\n\n    var body: some Scene {\n        WindowGroup {\n        }\n    }\n}\n```\n\n\u003Cbr\u002F>\n\u003Cbr\u002F>\n\n## Server-side Swift\n\nWe ❤️ server-side Swift 4 & 5 and SwiftyBeaver support it **out-of-the-box**! Try for yourself and run SwiftyBeaver inside a Ubuntu Docker container. Just install Docker and then go to your project folder on macOS or Ubuntu and type:\n\n```shell\n# create docker image, build SwiftyBeaver and run unit tests\ndocker run --rm -it -v $PWD:\u002Fapp swiftybeaver \u002Fbin\u002Fbash -c \"cd \u002Fapp ; swift build ; swift test\"\n\n# optionally log into container to run Swift CLI and do more stuff\ndocker run --rm -it --privileged=true -v $PWD:\u002Fapp swiftybeaver\n```\n\nBest: for the popular server-side Swift web framework [Vapor](https:\u002F\u002Fgithub.com\u002Fvapor\u002Fvapor) you can use **[our Vapor logging provider](https:\u002F\u002Fgithub.com\u002FSwiftyBeaver\u002FSwiftyBeaver-Vapor)** which makes server logging awesome again 🙌\n\n\u003Cbr\u002F>\n\u003Cbr\u002F>\n\n## Documentation\n\n**Getting Started:**\n\n- [Features](http:\u002F\u002Fdocs.swiftybeaver.com\u002Farticle\u002F7-introduction)\n- [Installation](http:\u002F\u002Fdocs.swiftybeaver.com\u002Farticle\u002F5-installation)\n- [Basic Setup](http:\u002F\u002Fdocs.swiftybeaver.com\u002Farticle\u002F6-basic-setup)\n\n**Logging Destinations:**\n\n- [Colored Logging to Xcode Console](http:\u002F\u002Fdocs.swiftybeaver.com\u002Farticle\u002F9-log-to-xcode-console)\n- [Colored Logging to File](http:\u002F\u002Fdocs.swiftybeaver.com\u002Farticle\u002F10-log-to-file)\n\n**Advanced Topics:**\n\n- [Custom Format & Context](http:\u002F\u002Fdocs.swiftybeaver.com\u002Farticle\u002F20-custom-format)\n- [Filters](http:\u002F\u002Fdocs.swiftybeaver.com\u002Farticle\u002F21-filters)\n\n\u003Cbr\u002F>\n\u003Cbr\u002F>\n\n## License\n\nSwiftyBeaver Framework is released under the [MIT License](https:\u002F\u002Fgithub.com\u002FSwiftyBeaver\u002FSwiftyBeaver\u002Fblob\u002Fmaster\u002FLICENSE).\n","SwiftyBeaver 是一个为 Swift 4 和 5 设计的日志记录库，旨在为开发和发布阶段提供便捷且安全的日志功能。其核心特性包括彩色日志输出至 Xcode 控制台、文件以及云端存储，支持自定义日志格式甚至转换成 JSON 格式。此外，它还提供了对 Google Cloud 等多种云平台的支持，允许用户创建自定义目的地以满足特定需求。SwiftyBeaver 轻量且灵活，非常适合 iOS、macOS 以及服务器端 Swift 应用的开发者使用，无论是本地调试还是远程监控都非常方便。",2,"2026-06-11 03:08:55","top_language"]