Add logging using Log4j2
This commit is contained in:
@@ -1,13 +1,17 @@
|
||||
package io.github.lumijiez;
|
||||
|
||||
import jakarta.persistence.EntityManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
|
||||
public class Main {
|
||||
public static Logger logger = LogManager.getLogger(Main.class);
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Node up");
|
||||
logger.info("Node up.");
|
||||
EntityManager em = Data.getEntityManager();
|
||||
|
||||
System.out.println("Connected to DB << symphony >>");
|
||||
logger.info("Connected to database: << symphony >>");
|
||||
em.close();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user