openmeetings-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From solo...@apache.org
Subject [openmeetings] branch master updated: no jira: payload is being printed for tests
Date Sat, 27 Jun 2020 08:07:17 GMT
This is an automated email from the ASF dual-hosted git repository.

solomax pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openmeetings.git


The following commit(s) were added to refs/heads/master by this push:
     new 8b4db7f  no jira: payload is being printed for tests
8b4db7f is described below

commit 8b4db7f9934458e47053c0be4413c272e742c3d2
Author: Maxim Solodovnik <solomax666@gmail.com>
AuthorDate: Sat Jun 27 15:07:04 2020 +0700

    no jira: payload is being printed for tests
---
 .../java/org/apache/openmeetings/util/OMContextListener.java  | 11 ++++++++++-
 .../src/main/webapp/WEB-INF/classes/logback-config.xml        |  3 ---
 openmeetings-web/src/test/resources/logback-test.xml          |  6 ++----
 3 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/openmeetings-util/src/main/java/org/apache/openmeetings/util/OMContextListener.java
b/openmeetings-util/src/main/java/org/apache/openmeetings/util/OMContextListener.java
index bb2b8bb..917fa1f 100644
--- a/openmeetings-util/src/main/java/org/apache/openmeetings/util/OMContextListener.java
+++ b/openmeetings-util/src/main/java/org/apache/openmeetings/util/OMContextListener.java
@@ -47,8 +47,17 @@ public class OMContextListener implements ServletContextListener {
 			JoranConfigurator configurator = new JoranConfigurator();
 			configurator.setContext(context);
 			context.reset();
-			try (InputStream cfgIs = getClass().getResourceAsStream("/logback-config.xml")) {
+			boolean configured = false;
+			try (InputStream cfgIs = getClass().getResourceAsStream("/logback-test.xml")) {
 				configurator.doConfigure(cfgIs);
+				configured = true;
+			} catch (Exception e) {
+				// no-op
+			}
+			if (!configured) {
+				try (InputStream cfgIs = getClass().getResourceAsStream("/logback-config.xml")) {
+					configurator.doConfigure(cfgIs);
+				}
 			}
 		} catch (Exception e) {
 			e.printStackTrace();
diff --git a/openmeetings-web/src/main/webapp/WEB-INF/classes/logback-config.xml b/openmeetings-web/src/main/webapp/WEB-INF/classes/logback-config.xml
index f37e911..54b64e2 100644
--- a/openmeetings-web/src/main/webapp/WEB-INF/classes/logback-config.xml
+++ b/openmeetings-web/src/main/webapp/WEB-INF/classes/logback-config.xml
@@ -43,10 +43,7 @@
 		</encoder>
 	</appender>
 	<logger name="com.mchange.v2" level="ERROR" />
-	<logger name="org.apache.axiom" level="ERROR" />
-	<logger name="org.apache.commons.httpclient" level="ERROR" />
 	<logger name="de.hunsicker.jalopy.io" level="ERROR" />
-	<logger name="httpclient.wire.header" level="ERROR" />
 	<logger name="org.apache.mina.filter.ssl.SslFilter" level="ERROR" />
 	<logger name="org.apache.openmeetings" level="DEBUG" />
 	<logger name="org.apache.cxf.services" level="WARN" /> <!-- no payload -->
diff --git a/openmeetings-web/src/test/resources/logback-test.xml b/openmeetings-web/src/test/resources/logback-test.xml
index 7ea8f69..d0f6c72 100644
--- a/openmeetings-web/src/test/resources/logback-test.xml
+++ b/openmeetings-web/src/test/resources/logback-test.xml
@@ -18,7 +18,7 @@
   under the License.
 
 -->
-<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" debug="true">
 	<contextName>${current_openmeetings_context_name}</contextName>
 
 	<jmxConfigurator contextName="${current_openmeetings_context_name}" />
@@ -43,12 +43,10 @@
 		</encoder>
 	</appender>
 	<logger name="com.mchange.v2" level="ERROR" />
-	<logger name="org.apache.axiom" level="ERROR" />
-	<logger name="org.apache.commons.httpclient" level="ERROR" />
 	<logger name="de.hunsicker.jalopy.io" level="ERROR" />
-	<logger name="httpclient.wire.header" level="ERROR" />
 	<logger name="org.apache.mina.filter.ssl.SslFilter" level="ERROR" />
 	<logger name="org.apache.openmeetings" level="DEBUG" />
+	<logger name="org.apache.cxf.services" level="DEBUG" /> <!-- for payload -->
 	<root level="INFO">
 		<appender-ref ref="FILE" />
 		<appender-ref ref="CONSOLE" />


Mime
View raw message