Search for log4j tutorials and read the documentation/Guide on the Apache Log4J 2 Home Page. Your thread would have been much better titled "Help with Log4J to create login log" or similar, because...