diff --git a/pom.xml b/pom.xml index 9fa85019e8..be4d6c6e02 100644 --- a/pom.xml +++ b/pom.xml @@ -10,10 +10,10 @@ SourceForge Tracker https://sourceforge.net/tracker/?group_id=66701 - - - - + + Jenkins + https://jenkins.openosp.ca + 2001 @@ -30,12 +30,12 @@ http://www.oscarcanada.org - - - - - - + + https://bitbucket.org/openoscar/oscar/wiki/Home + scm:git:https://bitbucket.org/openoscar/oscar/branch/master + scm:git:ssh:git@bitbucket.org:openoscar/oscar.git + master + UTF-8 2.17.0 @@ -59,11 +59,6 @@ http://oscarmcmaster.sourceforge.net/m2 - - - - - @@ -117,19 +112,6 @@ ${log4j2.version} - - - - - - - - - - - - - org.apache.logging.log4j log4j-api @@ -143,20 +125,6 @@ ${log4j2.version} - - - org.apache.logging.log4j - log4j-jcl - ${log4j2.version} - - - - - org.apache.logging.log4j - log4j-to-slf4j - ${log4j2.version} - - org.slf4j slf4j-api @@ -169,12 +137,6 @@ ${slf4j.version} - - org.slf4j - jcl-over-slf4j - ${slf4j.version} - - commons-lang commons-lang @@ -188,7 +150,7 @@ commons-io commons-io - 2.4 + 2.11.0 commons-fileupload @@ -298,7 +260,6 @@ spring-mock 2.0.8 - @@ -328,7 +289,6 @@ 2.2 - org @@ -497,7 +457,6 @@ com.lowagie itext - @@ -672,13 +631,7 @@ hsfo2 2.0 - + org.apache.xmlbeans @@ -814,6 +767,12 @@ org.apache.poi poi 5.0.0 + + + org.slf4j + jcl-over-slf4j + + - - org.apache.maven.doxia - doxia-module-markdown - 1.3 - - - - UTF-8 - UTF-8 - + + org.apache.maven.doxia + doxia-module-markdown + 1.3 + + + + UTF-8 + UTF-8 + com.mycila.maven-license-plugin @@ -1931,50 +1880,6 @@ - jdk7 diff --git a/set_env.sh b/set_env.sh index 8df1fc7a41..11059ee090 100644 --- a/set_env.sh +++ b/set_env.sh @@ -8,7 +8,7 @@ export WORKING_ROOT=`pwd` export CATALINA_BASE=${WORKING_ROOT}/catalina_base MEM_SETTINGS="-Xms640m -Xmx640m -Xss512k -XX:NewRatio=4 -XX:MaxPermSize=256m " -export JAVA_OPTS="-Djava.awt.headless=true -server -Xincgc -Dorg.apache.el.parser.COERCE_TO_ZERO=false -Dorg.apache.commons.logging.Log=org.apache.cxf.common.logging.Log4jLogger -Dorg.apache.cxf.Logger=org.apache.cxf.common.logging.Log4jLogger -Dlog4j.override.configuration=${WORKING_ROOT}/override_log4j.xml -Doscar_override_properties=${WORKING_ROOT}/oscar.properties "${MEM_SETTINGS} +export JAVA_OPTS="-Djava.awt.headless=true -server -Xincgc -Dorg.apache.el.parser.COERCE_TO_ZERO=false -Dorg.apache.commons.logging.Log=org.apache.cxf.common.logging.Log4j2Logger -Dorg.apache.cxf.Logger=org.apache.cxf.common.logging.Log4j2Logger -Dlog4j.override.configuration=${WORKING_ROOT}/override_log4j2.xml -Doscar_override_properties=${WORKING_ROOT}/oscar.properties "${MEM_SETTINGS} export MAVEN_OPTS="-Doscar_override_properties=${WORKING_ROOT}/oscar.properties "${MEM_SETTINGS} diff --git a/src/main/java/org/oscarehr/util/ContextStartupListener.java b/src/main/java/org/oscarehr/util/ContextStartupListener.java index 06efa710d4..2d4e068180 100644 --- a/src/main/java/org/oscarehr/util/ContextStartupListener.java +++ b/src/main/java/org/oscarehr/util/ContextStartupListener.java @@ -38,19 +38,26 @@ import org.quartz.impl.StdSchedulerFactory; import com.quatro.dao.security.SecroleDao; +import oscar.OscarProperties; public class ContextStartupListener implements javax.servlet.ServletContextListener { private static final Logger logger = org.oscarehr.util.MiscUtils.getLogger(); - + private static final OscarProperties oscarProperties = OscarProperties.getInstance(); @Override public void contextInitialized(javax.servlet.ServletContextEvent sce) { - try { - // ensure cxf uses log4j - System.setProperty("org.apache.cxf.Logger", "org.apache.cxf.common.logging.Log4jLogger"); + // ensure cxf uses log4j2 + System.setProperty("org.apache.cxf.Logger", "org.apache.cxf.common.logging.Log4j2Logger"); + + /* + * Map log4j version 1 to version 2 + */ + System.setProperty("log4j1.compatibility", "true"); + + try { String contextPath=sce.getServletContext().getContextPath(); - logger.info("Server processes starting. context=" + contextPath); + logger.info("Starting OSCAR context. context=" + contextPath); org.oscarehr.util.MiscUtils.addLoggingOverrideConfiguration(contextPath); @@ -60,8 +67,10 @@ public void contextInitialized(javax.servlet.ServletContextEvent sce) { MiscUtils.registerShutdownHook(); createOscarProgramIfNecessary(); - - CaisiIntegratorUpdateTask.startTask(); + + if(oscarProperties.getBooleanProperty("INTEGRATOR_ENABLED", "true")){ + CaisiIntegratorUpdateTask.startTask(); + } OscarJobUtils.initializeJobExecutionFramework(); @@ -69,7 +78,8 @@ public void contextInitialized(javax.servlet.ServletContextEvent sce) { //Run some optimizations loadCaches(); - logger.info("Server processes starting completed. context=" + contextPath); + + logger.info("OSCAR server processes started. context=" + contextPath); //bug 4195 - only runs once so long as it finishes..if you want it to not run, add entry //try your property table called "HRMFixMissingReportHelper.Run" with value = 1 @@ -123,7 +133,6 @@ public void contextDestroyed(javax.servlet.ServletContextEvent sce) { WaitListEmailThread.stopTask(); CaisiIntegratorUpdateTask.stopTask(); -// VmStat.stopContinuousLogging(); try { StdSchedulerFactory.getDefaultScheduler().shutdown(); diff --git a/src/main/java/oscar/form/FrmBCAR2020Action.java b/src/main/java/oscar/form/FrmBCAR2020Action.java index 029b1fc632..5afbba452a 100644 --- a/src/main/java/oscar/form/FrmBCAR2020Action.java +++ b/src/main/java/oscar/form/FrmBCAR2020Action.java @@ -33,6 +33,7 @@ import net.sf.jasperreports.export.SimpleExporterInput; import net.sf.jasperreports.export.SimpleOutputStreamExporterOutput; import org.apache.commons.lang.StringUtils; +import org.apache.logging.log4j.Logger; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; @@ -45,8 +46,6 @@ import org.oscarehr.util.LoggedInInfo; import org.oscarehr.util.MiscUtils; import org.oscarehr.util.SpringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import oscar.form.dao.FormBCAR2020Dao; import oscar.form.dao.FormBCAR2020DataDao; import oscar.form.dao.FormBCAR2020TextDao; @@ -77,7 +76,7 @@ public class FrmBCAR2020Action extends DispatchAction { private FormBCAR2020TextDao bcar2020TextDao = SpringUtils.getBean(FormBCAR2020TextDao.class); private SecurityInfoManager securityInfoManager = SpringUtils.getBean(SecurityInfoManager.class); - private final Logger logger = LoggerFactory.getLogger(FrmBCAR2020Record.class); + private final Logger logger = MiscUtils.getLogger(); private final String RECORD_NAME = "BCAR2020"; private SimpleDateFormat formDateFormat = new SimpleDateFormat( "yyyy/MM/dd"); diff --git a/src/main/java/oscar/login/Startup.java b/src/main/java/oscar/login/Startup.java index f134e01f61..d9c1c09b74 100644 --- a/src/main/java/oscar/login/Startup.java +++ b/src/main/java/oscar/login/Startup.java @@ -46,6 +46,8 @@ public class Startup implements ServletContextListener { private oscar.OscarProperties p = oscar.OscarProperties.getInstance(); public void contextInitialized(ServletContextEvent sc) { + logger.info( "Starting OSCAR application " ); + try { logger.debug("contextInit"); diff --git a/src/main/resources/log4j.xml b/src/main/resources/log4j.xml index a4436db97f..55a5cd3a48 100755 --- a/src/main/resources/log4j.xml +++ b/src/main/resources/log4j.xml @@ -18,18 +18,9 @@ - - - - - - - - - - - - + + + @@ -59,21 +50,6 @@ --> - - - - - - - - diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml new file mode 100644 index 0000000000..0f7f1b4a4d --- /dev/null +++ b/src/main/resources/log4j2.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + %d{yyyy-MM-dd-HH:mm:ss} %-5p %m%n + + + + + + + + + + + + + + + + \ No newline at end of file