On this link: https://stackoverflow.com/a/4055850/82609
It explains that
case class Person(name: String, age: Int) {
override def productPrefix = "person: "
}
// prints "person: (Aaron,28)" instead of "Person(Aaron, 28)"
println(Person("Aaron", 28))
Is there a way to do something like mixing the case class with some trait do provide a better ToString than the default one?
I don't really like to not have the field names printed, and for large case classes it is sometimes hard to read the logs.
Is it possible to have an output like this?
Person(
name="Aaron",
age=28
)