Skip to content

Instantly share code, notes, and snippets.

@nishiyamaosamu
Last active August 29, 2015 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nishiyamaosamu/d08654ddbc9d1746bfe8 to your computer and use it in GitHub Desktop.
Save nishiyamaosamu/d08654ddbc9d1746bfe8 to your computer and use it in GitHub Desktop.
Xcodeで色付きログのライブラリ(ColorLogger.swift)を作った ref: http://qiita.com/osamu1203/items/86d2a543f70bf094ae0f
let log = ColorLogger.defaultInstance
import UIKit
let log = ColorLogger.defaultInstance
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
log.verbose("This is Verbose Log")
log.debug("This is Debug Log")
log.info("This is Info Log")
log.warning("This is Warning Log")
log.error("This is Error Log")
log.outputLogLevel = .Warning
log.showLogLevel = true
log.showFileInfo = false
log.showDate = false
log.showFunctionName = true
log.outputLogLevel = .None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment