Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.