How to log exception and message with placeholders with SLF4J

后端 未结 1 1320
眼角桃花
眼角桃花 2021-01-31 07:13

What\'s the correct approach to log both an error message and an exception using SLF4J?

I\'ve tried doing this but the exception stack trace is never printed:

相关标签:
1条回答
  • 2021-01-31 07:30

    As of SLF4J version 1.6, SLF4J will interpret the last parameter as you intended, i.e. as an exception. You must be using an older version of SLF4J API.

    0 讨论(0)
提交回复
热议问题