-1

Sonar reports this bug: Correctness - Method passes an incorrect number of parameters to an SLF4J or Slf4j2 logging statement.

log.info("{}", e);

What should i do to fix it? Thanks

Andy Xu
  • 51
  • 6

1 Answers1

1

I think the correct way is the following code:

log.info("{}", e.getMessage());
mentallurg
  • 4,967
  • 5
  • 28
  • 36
kai.tian
  • 31
  • 1
  • 5