Latest 0.82
Homepage https://github.com/syxc/FYLogger
License MIT
Platforms ios 8.0, requires ARC
Authors

Version
Build Status

A tiny logging framework for iOS, Inspired by 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:

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

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
}

License

FYLogger is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "FYLogger",
    "version": "0.82",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "homepage": "https://github.com/syxc/FYLogger",
    "authors": {
        "syxc": "[email protected]"
    },
    "summary": "A tiny logging framework for iOS",
    "source": {
        "git": "https://github.com/syxc/FYLogger.git",
        "tag": "0.82"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": [
        "FYLogger/Source/*.{swift, h}",
        "FYLogger/*.h"
    ],
    "ios": {
        "frameworks": [
            "UIKit",
            "Foundation"
        ]
    },
    "requires_arc": true
}

Pin It on Pinterest

Share This