summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Lenz <thomas.lenz@egiz.gv.at>2019-05-24 08:18:35 +0200
committerThomas Lenz <thomas.lenz@egiz.gv.at>2019-05-24 08:18:35 +0200
commit6bd515d02b5d2c8bb81cf59a61962c6a8fbb84ef (patch)
treeb432d7b70ed5d14a74045a07d7b67512f9290d7a
parent4499851b7f0e60e05640c77bfbdc3f93ac77b743 (diff)
downloadEAAF-Components-6bd515d02b5d2c8bb81cf59a61962c6a8fbb84ef.tar.gz
EAAF-Components-6bd515d02b5d2c8bb81cf59a61962c6a8fbb84ef.tar.bz2
EAAF-Components-6bd515d02b5d2c8bb81cf59a61962c6a8fbb84ef.zip
update message-logging and remove explicit Logger implementation
-rw-r--r--eaaf_core/pom.xml4
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/services/ProtocolAuthenticationService.java13
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/utils/TransactionIDUtils.java14
-rw-r--r--eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/impl/logging/DummyStatusMessager.java4
4 files changed, 18 insertions, 17 deletions
diff --git a/eaaf_core/pom.xml b/eaaf_core/pom.xml
index 477f56b1..0f6b3082 100644
--- a/eaaf_core/pom.xml
+++ b/eaaf_core/pom.xml
@@ -40,10 +40,10 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
- <dependency>
+ <!-- dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
- </dependency>
+ </dependency-->
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/services/ProtocolAuthenticationService.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/services/ProtocolAuthenticationService.java
index 8e641338..6f416414 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/services/ProtocolAuthenticationService.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/services/ProtocolAuthenticationService.java
@@ -25,7 +25,6 @@ package at.gv.egiz.eaaf.core.impl.idp.auth.services;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringWriter;
-import java.util.Arrays;
import javax.naming.ConfigurationException;
import javax.servlet.http.HttpServletRequest;
@@ -388,8 +387,16 @@ public class ProtocolAuthenticationService implements IProtocolAuthenticationSer
String[] errorCodeParams = null;
if (params == null)
errorCodeParams = new String[] {};
- else
- errorCodeParams = Arrays.copyOf(params, params.length, String[].class);
+ else {
+ errorCodeParams = new String[params.length];
+ for (int i=0; i<params.length; i++) {
+ if (params[i] != null)
+ errorCodeParams[i] = params[i].toString();
+ else
+ errorCodeParams[i] = "'null'";
+
+ }
+ }
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/utils/TransactionIDUtils.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/utils/TransactionIDUtils.java
index bda2edc5..2e016848 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/utils/TransactionIDUtils.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/utils/TransactionIDUtils.java
@@ -65,42 +65,34 @@ public class TransactionIDUtils {
}
- public static void setServiceProviderId(String oaUniqueId) {
- org.apache.log4j.MDC.put(MDC_SERVICEPROVIDER_ID, oaUniqueId);
+ public static void setServiceProviderId(String oaUniqueId) {
org.slf4j.MDC.put(MDC_SERVICEPROVIDER_ID, oaUniqueId);
}
public static void removeServiceProviderId() {
- org.apache.log4j.MDC.remove(MDC_SERVICEPROVIDER_ID);
org.slf4j.MDC.remove(MDC_SERVICEPROVIDER_ID);
}
- public static void setTransactionId(String pendingRequestID) {
- org.apache.log4j.MDC.put(MDC_TRANSACTION_ID,
- "TID-" + pendingRequestID);
+ public static void setTransactionId(String pendingRequestID) {
org.slf4j.MDC.put(MDC_TRANSACTION_ID,
"TID-" + pendingRequestID);
}
public static void removeTransactionId() {
- org.apache.log4j.MDC.remove(MDC_TRANSACTION_ID);
org.slf4j.MDC.remove(MDC_TRANSACTION_ID);
}
- public static void setSessionId(String uniqueSessionId) {
- org.apache.log4j.MDC.put(MDC_SESSION_ID,
- "SID-" + uniqueSessionId);
+ public static void setSessionId(String uniqueSessionId) {
org.slf4j.MDC.put(MDC_SESSION_ID,
"SID-" + uniqueSessionId);
}
public static void removeSessionId() {
- org.apache.log4j.MDC.remove(MDC_SESSION_ID);
org.slf4j.MDC.remove(MDC_SESSION_ID);
}
diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/impl/logging/DummyStatusMessager.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/impl/logging/DummyStatusMessager.java
index 8862a2a5..f8390002 100644
--- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/impl/logging/DummyStatusMessager.java
+++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/impl/logging/DummyStatusMessager.java
@@ -24,6 +24,8 @@
*******************************************************************************/
package at.gv.egiz.eaaf.core.impl.logging;
+import java.util.Arrays;
+
import at.gv.egiz.eaaf.core.api.IStatusMessenger;
public class DummyStatusMessager implements IStatusMessenger {
@@ -32,7 +34,7 @@ public class DummyStatusMessager implements IStatusMessenger {
public String getMessage(String messageId, Object[] parameters) {
return "No StatusMessager-Backend available! "
+ "StatusCode:" + messageId
- + " Params:" + parameters;
+ + " Params:" + Arrays.toString(parameters);
}