Here's a revised overview of the steps:
- Decided which logging framework will be your primary, aka who will actually write to your log file.
- Define the dependency scope of all the secondary frameworks to be 'provided'.
- Configure your project to depend on drop-in replacements of each secondary framework from SLF4J.
Define secondary frameworks as provided
Use the dependencyManagement section for this. Its used when you might have a dependency transitively.
Add dependency on SLF4J
Add the following to your pom.xml
So now in only 3 steps you can redirect all your logging to your primary logging framework without changing a line of code!