younger_times
2023-06-14 177ae5f9f619bd39e2d505709d8c5b419e7867ee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//
//  Def.swift
//  WanPai
//
//  Created by 杨锴 on 2023/6/7.
//
 
import Foundation
import UIKit
 
let app = UIApplication.shared.delegate as! AppDelegate
 
var screnDelegate:SceneDelegate? = {
    var uiScreen:UIScene?
    UIApplication.shared.connectedScenes.forEach { scenes in
        uiScreen = scenes
    }
    return (uiScreen?.delegate as? SceneDelegate)
}()
 
 
 
func LogSuccess(_ items:Any...,separator:String=" ",file:String=#file,function:String=#function,line:Int=#line){
#if DEBUG
    let file = (file as NSString).lastPathComponent.split(separator: ".").first!;
    print("✅✅✅ SUCCESS: \(file)  \(function) [Line: \(line)]: \(items)",separator);
#endif
}
 
func LogError(_ items:Any...,separator:String=" ",file:String=#file,function:String=#function,line:Int=#line){
#if DEBUG
    let file = (file as NSString).lastPathComponent.split(separator: ".").first!;
    print("❌❌❌ ERROR: \(file)  \(function) [Line: \(line)]: \(items)",separator);
#endif
}
 
func LogInfo(_ items:Any...,separator:String=" ",file:String=#file,function:String=#function,line:Int=#line){
#if DEBUG
    let file = (file as NSString).lastPathComponent.split(separator: ".").first!;
    print("⚠️⚠️⚠️INFO: \(file)  \(function) [Line: \(line)]: \(items)",separator);
#endif
}