thieumao

__pretty_function__ - print info file Swift

Apr 16th, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 0.23 KB | None | 0 0
  1. import Foundation
  2.  
  3. func __pretty_function__(_ file:String = #file, function:String = #function, line:Int = #line) {
  4.     #if DEBUG
  5.         print("file:\(file.lastPathComponent)\n function:\(function)\n line:\(line)")
  6.     #endif
  7. }
Advertisement
Add Comment
Please, Sign In to add comment