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
  • 29,281
  • 63
  • 213
  • 385

0 Answers0