A lightweight library to log your codes and errors safely.
To run the example project, clone the repo, and run pod install
from the Example directory first.
SwiftBeacon is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'SwiftBeacon'
Simply add the following line to your Podfile:
pod 'SwiftBeacon'
pod 'SwiftBeacon', :git => 'https://github.com/nazmiyavuz/SwiftBeacon.git', :branch => 'main'
or
platform :ios, '12.0'
use_frameworks!
target '<Your Target Name>' do
pod 'SwiftBeacon', :git => 'https://github.com/nazmiyavuz/SwiftBeacon.git', :branch => 'main'
end
pod 'SwiftBeacon', '~> 1.0.5'
SwiftBeacon is available through Swift Package Manager. To install
it, in Xcode select File
> Add Package Dependencies...
and add SwiftBeacon repository URL:
https://github.com/nazmiyavuz/SwiftBeacon.git
Note: Please update the latest version or main
branch of the SwiftBeacon repository in order to get the latest features.
In AppDelegate.swift or any public level you should add the following code:
- if iOS 15.0 or higher you can add logName so you are able to filter your logs. The logName parameter is optional. Its default value is
nil
.
import SwiftBeacon
let uiDesignLogger = SwiftBeacon(logName: "uiDesign")
- if you use the version which is lesser than iOS 15.0 you should add the following code.
import SwiftBeacon
let logger = SwiftBeacon()
Then you can log your code safely by using the following code:
logger.trace("Trace example")
logger.debug("Debug example")
logger.info("Info example")
logger.notice("Notice example")
logger.warning("Warning example")
logger.error("Error example")
logger.critical("Critical example")
logger.fault("Fault example")
nazmiyavuz, [email protected]
SwiftBeacon is available under the MIT license. See the LICENSE file for more info.