package io.github.oliviercailloux.javase_maven_jul_hib_h2.launch;

import java.util.logging.Logger;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.EntityTransaction;
import javax.persistence.Persistence;

import io.github.oliviercailloux.javase_maven_jul_hib_h2.entities.MyEntity;

public class Launcher {
	@SuppressWarnings("unused")
	private static final Logger LOGGER = Logger.getLogger(Launcher.class.getCanonicalName());

	public static void main(String[] args) {
		LOGGER.info("Starting.");
		new Launcher().launch();
	}

	public void launch() {
		EntityManagerFactory factory = Persistence.createEntityManagerFactory("MyUnit");
		EntityManager em1 = factory.createEntityManager();
		EntityTransaction tx = em1.getTransaction();
		tx.begin();
		MyEntity myEntity = new MyEntity();
		em1.persist(myEntity);
		LOGGER.info("New entity id: " + myEntity.getId() + ".");
		tx.commit();
		tx.begin();
		myEntity.setName("MyName");
		tx.commit();
		em1.close();
		factory.close();
	}
}

@@ -528,16 +528,366 @@
 args) %7B%0A
+%09%09final String loggingConfigFilePathProperty = %22java.util.logging.config.file%22;%0A%09%09final String loggingConfigFilePathValue = System.getProperty(loggingConfigFilePathProperty);%0A%09%09if (loggingConfigFilePathValue == null) %7B%0A%09%09%09LOGGER.warning(%22Property %22 + loggingConfigFilePathProperty%0A%09%09%09%09%09+ %22 not set. Logging will use its default configuration.%22);%0A%09%09%7D%0A
 %09%09LOGGER

Check that logging config file path is set.