Last Updated: February 25, 2016
·
1.111K
· swartkrans

How to print the type name of something in scala for logging

getClass.getSimpleName does the trick and helpful when debugging json:

printf("type of networks: %s\n", config("networks").getClass.getSimpleName)

prints:

type of networks: JArray