///全局函数
func DLog<T>(_ message:T,file:String = #file,funcName:String = #function,lineNum:Int = #line){
#if DEBUG // 判断是否在测试环境下
// TODO
let file = (file as NSString).lastPathComponent;
print("\n****** \(file): [\(lineNum)] *****\n\(message)\n********\n\n");
#else
// TODO
#endif
}
网友评论