Last active
August 29, 2015 14:18
-
-
Save nishiyamaosamu/d08654ddbc9d1746bfe8 to your computer and use it in GitHub Desktop.
Xcodeで色付きログのライブラリ(ColorLogger.swift)を作った ref: http://qiita.com/osamu1203/items/86d2a543f70bf094ae0f
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let log = ColorLogger.defaultInstance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
let log = ColorLogger.defaultInstance | |
@UIApplicationMain | |
class AppDelegate: UIResponder, UIApplicationDelegate { | |
var window: UIWindow? | |
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
log.outputLogLevel = .Warning |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
log.showLogLevel = true | |
log.showFileInfo = false | |
log.showDate = false | |
log.showFunctionName = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
log.outputLogLevel = .None |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment