file:打印当前文件路径
line:打印当前行号,整数
function:打印当前函数或方法
column :所在的列数
printSome(lineStr: Int(#line), fileStr: String(#file), funStr: String(#function))
func printSome(lineStr: Int = #line, fileStr: String = #file, funStr: String = #function) {
print("line:\(lineStr) file:\(fileStr) fun:\(funStr)")
}
网友评论