Skip to content

cvillaseca/CVLoggerSwift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CVLoggerSwift

CI Status Version License Platform

CVLoggerSwift is a tool that shows a button over UIWindow (only DEBUG build). When it pushed will show any log printed.

screenshot

Show Appetize.io DEMO

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

In your AppDelegate.swift:

import CVLoggerSwift

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?
var cvlogger: CVLogger?


func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {

let storyboard = UIStoryboard(name: "Main", bundle: nil)
let mainVC = storyboard.instantiateInitialViewController()

if window != nil {
window = UIWindow(frame: UIScreen.mainScreen().bounds)
window?.rootViewController = mainVC
window?.makeKeyAndVisible()
}


// #if DEBUG //Set it in the "Swift Compiler - Custom Flags" section, "Other Swift Flags" line. You add the DEBUG symbol with the -D DEBUG entry.
cvlogger = CVLogger()
// #endif

CVLogger.print("Lorem ipsum dolor sit amet, at ridiculus fringilla tristique, ante commodo sed, commodo condimentum turpis, quam euismod praesent tincidunt. Erat vestibulum dui auctor dictumst sem in, ullamcorper sed morbi magna et suscipit dolore, consequatur ante laoreet, nisl eget. Sociis libero et sed euismod. Quis dictum lacus in quam, est duis integer pede facilisis mauris. In nec egestas lorem in morbi platea, enim aliquam consequat, cursus saepe blanditiis, ut risus malesuada quisque ornare ornare iaculis. Adipiscing dolor sed sed ut netus, ut at aenean interdum. Ligula sed adipiscing, adipiscing nisl pede eget adipisicing mauris proin, ac quam dui suspendisse diam ultrices massa. A a odio volutpat auctor.")

CVLogger.print("last log entry")

return true
}

Requirements

CVLoggerSwift works on iOS 8+. It depends on the following Apple frameworks, which should already be included with most Xcode templates:

  • Foundation.framework
  • UIKit.framework

You will need the latest developer tools in order to build CVLoggerSwift. Old Xcode versions might work, but compatibility will not be explicitly maintained.

Installation

CVLogger is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "CVLoggerSwift"

Author

Cristian Villaseca, [email protected]

License

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

About

This library provides a app log viewer for your debug mode app

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors