测试测试版 | ✗ |
Lang语言 | SwiftSwift |
许可证 | MIT |
发布最新发布 | 2017年12月 |
SwiftSwift 版本 | 4.0 |
SPM支持 SPM | ✗ |
由 Andrew Garcia 维护。
将 SwiftyBeaver 库接收并将日志发送到 Slack 的消息, 当调用 slacky.error(message) 时。
SlackyBeaver 可以通过 CocoaPods 获取。要安装它,只需在 Podfile 中添加以下行:
pod "SlackyBeaver"
将此代码片段添加到接近您的 AppDelegate.swift
文件的最顶部,以便在整个项目中使用 SwiftyBeaver。
import SlackyBeaver
let slacky = SlackyBeaver(slackToken: "YOUR-SLACK-API-TOKEN-HERE", slackChannel: "ios-logs")
然后您可以调用
slacky.debug(message: "Here is first log")
slacky.verbose(message: "Here is second log")
slacky.info("Here is third log")
slacky.warning("Here is fourth log")
slacky.error("This will log, then send the logs to the slack channel")
在调用 slacky.error
时,它将在后台线程中将日志发送到配置的 Slack 频道。
drewg233, [email protected]
SlackyBeaver 可在 MIT 许可下使用。有关更多信息,请参阅 LICENSE 文件。