TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Sep 2016 |
SPMSupports SPM | ✓ |
Maintained by syxc.
A tiny logging framework for iOS, Inspired by HeliumLogger.
UIAlertView
swift2.3
master
FYLogger supports multiple methods for installing the library in a project.
To integrate FYLogger into your Xcode project using CocoaPods, specify it in your Podfile
:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
target 'TargetName' do
pod 'FYLogger'
end
You can copy file FYLog.swift
to the project.
import FYLogger
let log = FYLog()
log.info("from \(self.classForCoder)")
log.alert("from \(self.classForCoder)")
Debug, Release model
By using Swift build flags, different log levels can be used in debugging versus staging/production. Go to Build settings -> Swift Compiler - Custom Flags -> Other Swift Flags and add
-DDEBUG
to the Debug entry.
/// Setup FYLogger
func setupLogger() {
#if DEBUG
log.debug = true
#else
log.debug = false
#endif
}
FYLogger is available under the MIT license. See the LICENSE file for more info.