|
@@ -133,15 +133,20 @@ public func kf_imageCacheImage(originUrl: String, completeHandle: @escaping (_ i
|
|
}
|
|
}
|
|
|
|
|
|
/** 打印 */
|
|
/** 打印 */
|
|
-public func BFLog<T>( _ type : Int = 9, _ file:String = #file, _ line:Int = #line, message: T) {
|
|
|
|
|
|
+public func BFLog<T>( _ type : Int = 0, _ file:String = #file, _ line:Int = #line, message: T) {
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ let file = (file as NSString).lastPathComponent;
|
|
|
|
+ let dateFmt = DateFormatter()
|
|
|
|
+ dateFmt.dateFormat = "HH:mm:ss:SSSS"
|
|
|
|
+ let msg = "\(dateFmt.string(from: Date())) \(file):(\(line))--\(message)"
|
|
|
|
+
|
|
#if DEBUG
|
|
#if DEBUG
|
|
if type == 0 {
|
|
if type == 0 {
|
|
- print(message)
|
|
|
|
|
|
+
|
|
|
|
+ BuglyLog.level(.warn, logs: msg)
|
|
}else if type == 3 {
|
|
}else if type == 3 {
|
|
- let file = (file as NSString).lastPathComponent;
|
|
|
|
- let dateFmt = DateFormatter()
|
|
|
|
- dateFmt.dateFormat = "HH:mm:ss:SSSS"
|
|
|
|
- print("hhz-\(dateFmt.string(from: Date())) \(file):(\(line))--\(message)");
|
|
|
|
|
|
+ print("hhz-\(msg)");
|
|
}
|
|
}
|
|
#endif
|
|
#endif
|
|
// if PQENVUtil.shared.envMode == .ENVModeTest {
|
|
// if PQENVUtil.shared.envMode == .ENVModeTest {
|