Skip to content

Instantly share code, notes, and snippets.

@EyreFree
Last active July 19, 2017 06:59
Show Gist options
  • Save EyreFree/b5ad1317eea302fb653bf6172e2e728d to your computer and use it in GitHub Desktop.
Save EyreFree/b5ad1317eea302fb653bf6172e2e728d to your computer and use it in GitHub Desktop.
printLog.swift
import Foundation
func printLog<T>(_ message: T,
file: String = #file,
method: String = #function,
line: Int = #line)
{
#if DEBUG
print("\((file as NSString).lastPathComponent)[\(line)], \(method): \(message)")
#endif
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment