Create log with package name
import org.apache.log4j.*; public class SimpleLogging { public static void main(String[] args) { Logger logger = Logger.getLogger(SimpleLogging.class.getPackage().getName()); logger.info("Hello this is an info message"); } }