https://github.com/syxc/fylogger
A tiny logging framework for iOS, Inspired by HeliumLogger.
https://github.com/syxc/fylogger
Last synced: 4 months ago
JSON representation
A tiny logging framework for iOS, Inspired by HeliumLogger.
- Host: GitHub
- URL: https://github.com/syxc/fylogger
- Owner: syxc
- License: mit
- Created: 2016-02-23T11:34:59.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-10-04T15:36:43.000Z (over 8 years ago)
- Last Synced: 2025-01-18T18:18:32.418Z (5 months ago)
- Language: Swift
- Homepage:
- Size: 37.1 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# FYLogger
[](http://cocoapods.org/pods/FYLogger)
[](https://travis-ci.org/syxc/FYLogger)A tiny logging framework for iOS, Inspired by [HeliumLogger](https://github.com/IBM-Swift/HeliumLogger).
## Features
- Different logging levels such as Warning, Verbose, and Error
- Support Show logging in `UIAlertView`
- Debug, Release model## Branch
- Swift 2.2 - 2.3 & Xcode 8.0 `swift2.3`
- Swift 3.0 & Xcode 8.0 `master`## Installation
FYLogger supports multiple methods for installing the library in a project.
### Installation with CocoaPods
> CocoaPods 0.39.0+ is required to build FYLogger.
#### Podfile
To integrate FYLogger into your Xcode project using CocoaPods, specify it in your ```Podfile```:
```ruby
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'target 'TargetName' do
pod 'FYLogger'
end
```### Installation Manual
You can copy file ```FYLog.swift``` to the project.
## Example Usage
```swift
import FYLoggerlet 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.```swift
/// Setup FYLogger
func setupLogger() {
#if DEBUG
log.debug = true
#else
log.debug = false
#endif
}
```## License
FYLogger is available under the MIT license. See the [LICENSE](https://github.com/syxc/FYLogger/blob/master/LICENSE) file for more info.