定全局函数:
///全局函数
func CCLog<T>(_message:T,file:String=#file,funcName:String=#function,lineNum:Int=#line) {
#if DEBUG let file = (fileasNSString).lastPathComponent;
print("\(file):(\(lineNum))--\(message)");
#endif
}
定全局函数:
///全局函数
func CCLog<T>(_message:T,file:String=#file,funcName:String=#function,lineNum:Int=#line) {
#if DEBUG let file = (fileasNSString).lastPathComponent;
print("\(file):(\(lineNum))--\(message)");
#endif
}
本文标题:swift 自定义Log
本文链接:https://www.haomeiwen.com/subject/kmqcldtx.html
网友评论