Add pre-configured console destinations 🔌 for, and based on SwiftyBeaver.
Available destinations:
- iOS 9
- Xcode 9.2+
- Swift 4
SwiftyBeaver-Destinations is available through CocoaPods. To install it, simply add the following line to your Podfile with your desired destination:
pod "SwiftyBeaver-Destinations/LogEntries"
pod "SwiftyBeaver-Destinations/Logmatic"
If you just want utils :
pod "SwiftyBeaver-Destinations/Core"
(SwiftyBeaver + Utils)
To run the example project, clone the repo, and run pod install
from the Example
directory first.
In your AppDelegate class, add let log = SwiftyBeaver.self
Configure SwiftyBeaver by adding your destinations: log.addDestination(<YourDestination>)
Available destinations at the moment are:
LogEntriesDestination(token: String, level: SwiftyBeaver.Level)
Logmatic(apiKey: String, level: SwiftyBeaver.Level)
LogUtils
file contains methods for logs:
- device details's dictionary (OS version, host name, device name and model):
deviceDetails() -> [String: String]
- thread name if you aren't on the main thread:
threadName() -> String
Destinations
file contains methods for SwiftyBeaver:
SwiftyBeaver's extensions:
- remove a destination:
log.removeDestination(_ dest: BaseDestination.Type)
Default destinations:
- Default console with emojis 🎉:
log.addDestination(Destinations.console)
Made in 🇫🇷 by the Smart&Soft iOS Team.
SwiftyBeaver-Destinations is available under the MIT license. See the LICENSE file for more info.