Skip to content

Instantly share code, notes, and snippets.

@ileacristian
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ileacristian/db24e5d04a3113f44157 to your computer and use it in GitHub Desktop.
Save ileacristian/db24e5d04a3113f44157 to your computer and use it in GitHub Desktop.
exemplu logger
func myLog(message: String, function: String = __FUNCTION__, file: String = __FILE__, line: Int = __LINE__) {
println("Message: \(message)\ \n(From file: \(file), Function: \(function), Line: \(line))")
}
// Ex. apel
myLog("Salut")
// Exemplu de output
// Message: Salut
// From file: /Users/cilea/workspace/AutolayoutTests/AutolayoutTests/SecondViewController.swift, Function: growText, Line: 37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment