Skip to content

Instantly share code, notes, and snippets.

@vodamiro
Created April 11, 2019 13:59
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 vodamiro/47a0d99b7be40fda930682bb9c71c7ad to your computer and use it in GitHub Desktop.
Save vodamiro/47a0d99b7be40fda930682bb9c71c7ad to your computer and use it in GitHub Desktop.
S_A_DefaultValues.kt
fun logException(e: Throwable, level = Log.ERROR) {
// implementation
}
// Then you can call the method without providing the second parameter
logException(IllegalStateException("Test exception"))
logException(IllegalStateException("Test exception"), Log.WARN)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment