func XJLog(message:T,file : String = #file, funName : String = #function, lineNum : Int = #line){
#if DEBUG
let fileName = (file as NSString).lastPathComponent
print("文件名:\(fileName)--函数:\(funName)--行数:\(lineNum)----\(message)")
#endif
}
会得到详细打印:
文件名:ViewController.swift--函数:viewDidLoad()--行数:46----hahaha
网友评论