See the bellow points in order to fix the issue.
- Log through SLF4J only.
- Check for multiple appenders targeting the same output.
- Ensure only one logging implementation is present on the classpath.
- Set additivity="false" to avoid message propagation.
- Avoid duplicate logging statements in your code.
- Make sure there is a single SLF4J binding.
By following these steps, you should be able to prevent duplicate log messages in your Java application.