Log

作者: fordring2008 | 来源:发表于2017-02-05 12:34 被阅读6次

// Log 输出func printLog(_ message: T,

file: String = #file,

method: String = #function,

line: Int = #line){

#if DEBUG

print("\((file as NSString).lastPathComponent)[\(line)], \(method):  \(message)")

#endif

}

printLog("这是一条输出")  // playground764.swift[235], __lldb_expr_764:  这是一条输出

相关文章

网友评论

      本文标题:Log

      本文链接:https://www.haomeiwen.com/subject/jbfeittx.html