Skip to content

Instantly share code, notes, and snippets.

@vivalalova
Last active November 15, 2016 15:56
Show Gist options
  • Select an option

  • Save vivalalova/f58a5880d23015d90f9e84f6fbc4145d to your computer and use it in GitHub Desktop.

Select an option

Save vivalalova/f58a5880d23015d90f9e84f6fbc4145d to your computer and use it in GitHub Desktop.
#if DEBUG
func Log( message: @autoclosure () -> String, filename: NSString = #file, function: String = #function, line: Int = #line) {
print("[\(filename.lastPathComponent):\(line)] %@", message())
}
#else
func dLog(@autoclosure message: () -> String, filename: NSString = #file, function: String = #function, line: Int = #line) {
}
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment