|
@@ -132,27 +132,35 @@ public func kf_imageCacheImage(originUrl: String, completeHandle: @escaping (_ i
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-/** 打印 */
|
|
|
-public func BFLog<T>( _ type : Int = 9, _ file:String = #file, _ line:Int = #line, message: T) {
|
|
|
+/** 打印
|
|
|
+ type = 1 : 胡志强
|
|
|
+ type = 2 :王成
|
|
|
+ type = 3 : 文伟伟
|
|
|
+
|
|
|
+ */
|
|
|
+public func BFLog<T>( _ type : Int = 0, _ file:String = #file, _ line:Int = #line, message: T) {
|
|
|
+
|
|
|
+ let file = (file as NSString).lastPathComponent;
|
|
|
+ let msg = "\(file) (L:\(line)) \(message)"
|
|
|
+ if type == 0{
|
|
|
+ BuglyLog.level(.warn, logs: msg)
|
|
|
+ }
|
|
|
#if DEBUG
|
|
|
- if type == 0 {
|
|
|
- print(message)
|
|
|
- }else if type == 3 {
|
|
|
- let file = (file as NSString).lastPathComponent;
|
|
|
+ if type == 1 {
|
|
|
let dateFmt = DateFormatter()
|
|
|
dateFmt.dateFormat = "HH:mm:ss:SSSS"
|
|
|
- print("hhz-\(dateFmt.string(from: Date())) \(file):(\(line))--\(message)");
|
|
|
- }
|
|
|
+ print("hhz-\(dateFmt.string(from: Date())) \(msg)");
|
|
|
+ }else if type == 2 {
|
|
|
+ let dateFmt = DateFormatter()
|
|
|
+ dateFmt.dateFormat = "HH:mm:ss:SSSS"
|
|
|
+ print("ak-\(dateFmt.string(from: Date())) \(msg)");
|
|
|
+ }else if type == 3 {
|
|
|
+ let dateFmt = DateFormatter()
|
|
|
+ dateFmt.dateFormat = "HH:mm:ss:SSSS"
|
|
|
+ print("ww-\(dateFmt.string(from: Date())) \(msg)");
|
|
|
+ }
|
|
|
+
|
|
|
#endif
|
|
|
-// if PQENVUtil.shared.envMode == .ENVModeTest {
|
|
|
-//
|
|
|
-// }else{
|
|
|
-// if(PQBFConfig.shared.enableBFLog){
|
|
|
-// print(message)
|
|
|
-// }else{
|
|
|
-// BuglyLog.level(.warn, logs: message as? String)
|
|
|
-// }
|
|
|
-// }
|
|
|
|
|
|
}
|
|
|
|