Skip to content

Instantly share code, notes, and snippets.

@bob910078
Created May 27, 2018 06:41
Show Gist options
  • Save bob910078/b43cc688c3ec5966b8bf3b1620a6b2c5 to your computer and use it in GitHub Desktop.
Save bob910078/b43cc688c3ec5966b8bf3b1620a6b2c5 to your computer and use it in GitHub Desktop.
import UIKit
func printf<T>(msg message: T, file: String = #file, method: String = #function, line: Int = #line) {
let fileName = (file as NSString).lastPathComponent
print("\(fileName) [\(line)], \(method): \(message)")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment