Skip to content

Instantly share code, notes, and snippets.

@japgolly
Created November 11, 2018 06:55
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 japgolly/5b55e29adaee042d1460161406fe8b9c to your computer and use it in GitHub Desktop.
Save japgolly/5b55e29adaee042d1460161406fe8b9c to your computer and use it in GitHub Desktop.
logJvmInfo()
def logJvmInfo(): Unit = {
val header: List[String] =
"System Property" :: "Value" :: Nil
val data: List[List[String]] =
sys.props
.filterKeys(_.matches("""^(java\.(runtime|spec|version|vm)|jvmci|os\.).*"""))
.toList
.sorted
.map(x => x._1 :: x._2 :: Nil)
val table = AsciiTable(header :: data)
logger.info(s"JVM settings:\n$table")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment