What is the difference between SLF4j and log4J/log4j2?(Logging frameworks vs Logging wrappers in java)

Aditya
2 min readNov 5, 2020

When we create a java application, we would like to log the statements, at different logging levels( info, warn, debug, error e.t.c), so that it helps to trace the program flow while troubleshooting.So when we decide to implement logging for a given application instead of using stdout, we can use several logging frameworks available in the market like log4j, logback,log4j2, tinylog e.t.c

--

--

Aditya

Principal data engineer → Distributed Threat hunting security platform | aws certified solutions architect | gssp-java | Chicago-IL