You cannot use slf4j for this, you just save your old configuration code for log4j.
slf4j does not handle part of the configuration, which would be very difficult to generalize to all supported logging systems. slf4j is just an API for handling calls that are sent to a specific logging implementation. It also offers several bridges, such as redirecting java.util.logging to slf4j.
What happens with log output is not part of the slf4j API.
source
share