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
Written by swarktrans
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Scala
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#