add Logging to various locations #11

Merged
tueem merged 18 commits from feat/logging into dev 2024-12-20 17:51:24 +00:00
Showing only changes of commit a17f5e826f - Show all commits

View File

@ -0,0 +1,20 @@
package net.tomatentum.marinara.util;
import java.util.Properties;
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.simple.SimpleLogger;
import org.apache.logging.log4j.util.PropertiesUtil;
import org.apache.logging.log4j.util.ProviderUtil;
public class LoggerUtil {
public static Logger getLogger(String name) {
if (ProviderUtil.hasProviders()) {
return LogManager.getLogger(name);
}else
return new SimpleLogger(name, Level.DEBUG, true, false, true, true, "yyyy-MM-dd HH:mm:ss.SSSZ", null,
new PropertiesUtil(new Properties()), System.out);
}
}