#
Swift中自定义Log:依次是类名.方法名.行号.内容.
1 | func LTLog<T>(funcName: String = #function,_ message: T,file: String = #file, line: Int = #line) { |
还要配置以下宏
假如我在一个函数中打印这个”我是靓仔”
1 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { |
最终会输出
1 | AppDelegate.application(_:didFinishLaunchingWithOptions:)[23]:撒大大的 |
注:依次是类名.方法名.行号.内容.