You mentioned the question of how to slf4j and log4j , m, assuming that your project is configured to use SLF4J and that he uses log4j binding.
If you use the SLF4J binding in your class (from the import org.slf4j.Logger;top), you need to use LoggerFactory.getLogger(and you will also need import org.slf4j.LoggerFactory;).
If you use log4j directly (from import org.apache.log4j.Logger;the top of your class), use Logger.getLogger.
SLF4J , , . , SLF4J, SLF4J. , log4j , , , , SLF4J. ( SLF4J, , .)
, , , , Logger, , , .