Skip to content

Instantly share code, notes, and snippets.

@wangpeng1
Created June 29, 2015 09:39
Show Gist options
  • Save wangpeng1/4c033df0212e3f789199 to your computer and use it in GitHub Desktop.
Save wangpeng1/4c033df0212e3f789199 to your computer and use it in GitHub Desktop.
打印
import Foundation
func printlog(message:String, filePath : String = __FILE__, functionName : String = __FUNCTION__, line : Int = __LINE__){
let fileName = filePath.lastPathComponent
println("\(fileName) \(functionName) [Line \(line)]: \(message)")
}
func printlog(filePath : String = __FILE__, functionName : String = __FUNCTION__, line : Int = __LINE__){
let fileName = filePath.lastPathComponent
println("\(fileName) \(functionName) [Line \(line)]")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment