4

I would like logger to output toString() of calling class instance. And I don't want to send it explicitly by

log.info("{}: message", this.toString());

but I want to code

log.info("message");

and have some pattern configured in logback.xml.

Is it possible?

Suzan Cioc
  • 27,971
  • 54
  • 206
  • 370

0 Answers0