Latest 1.2
Homepage https://github.com/Progeny/Urk
License MIT
Platforms ios 8.0, osx 10.9, requires ARC
Authors

Log Manager made in Swift, for Swift projects

The main purpose of Urk is to provide a valid alternative to NSLog.

Requirements

  • Xcode 6.3
  • iOS 8.0

Installation

CocoaPods is a dependency manager for Cocoa projects.
CocoaPods 0.36 adds supports for Swift and embedded frameworks.

To integrate Urk into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

pod 'Urk', '~> 1.2'

Then, run the following command:

$ pod install

Usage

Importing the Framework

import Urk

Logging

Urk.info("info message")
Urk.success("success message")
Urk.warning("warning message")
Urk.error("error message")

will produce the output:

2015-04-17 09:52:37.019 ViewController.swift(19) viewDidLoad() INFO: info message
2015-04-17 09:52:37.089 ViewController.swift(20) viewDidLoad() SUCCESS: success message
2015-04-17 09:52:37.091 ViewController.swift(21) viewDidLoad() WARNING: warning message
2015-04-17 09:52:37.092 ViewController.swift(22) viewDidLoad() ERROR: error message

Log’s filtering

If you want to filter logs, you have to specify what types of log you want.

Urk.outputLogs = [LogType.Error, LogType.Success]

will produce as output:

2015-04-17 10:32:20.196 ViewController.swift(21) viewDidLoad() SUCCESS: success message
2015-04-17 10:32:20.200 ViewController.swift(23) viewDidLoad() ERROR: error message

Latest podspec

{
    "name": "Urk",
    "version": "1.2",
    "license": "MIT",
    "summary": "Log Manager in Swift",
    "homepage": "https://github.com/Progeny/Urk",
    "social_media_url": "https://twitter.com/vitobellini",
    "authors": {
        "Vito Bellini": "[email protected]"
    },
    "source": {
        "git": "https://github.com/Progeny/Urk.git",
        "tag": "1.2"
    },
    "platforms": {
        "ios": "8.0",
        "osx": "10.9"
    },
    "source_files": "Source/*.swift",
    "requires_arc": true
}

Pin It on Pinterest

Share This