summaryrefslogtreecommitdiff
path: root/eaaf_core/src/main/java/at
diff options
context:
space:
mode:
authorThomas Lenz <thomas.lenz@egiz.gv.at>2020-11-06 11:17:30 +0100
committerThomas Lenz <thomas.lenz@egiz.gv.at>2020-11-06 11:17:30 +0100
commit69132ec5bc165395458e49c421d0f38925d16ec5 (patch)
treef0a413cb69378472ab4bb9b2888e611135f87c08 /eaaf_core/src/main/java/at
parent1c19ec91df9f0cd6a010d16c9190c5d16ec5fdc8 (diff)
downloadEAAF-Components-69132ec5bc165395458e49c421d0f38925d16ec5.tar.gz
EAAF-Components-69132ec5bc165395458e49c421d0f38925d16ec5.tar.bz2
EAAF-Components-69132ec5bc165395458e49c421d0f38925d16ec5.zip
adapt logging to improve debugging
Diffstat (limited to 'eaaf_core/src/main/java/at')
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/RequestStorage.java9
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/AbstractController.java4
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/ProtocolFinalizationController.java5
3 files changed, 14 insertions, 4 deletions
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/RequestStorage.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/RequestStorage.java
index 48c9d1bd..86c50be0 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/RequestStorage.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/RequestStorage.java
@@ -69,10 +69,17 @@ public class RequestStorage implements IRequestStorage {
// search invalid pending-request for errorHandling
IRequest invalidPendingRequest = null;
- try {
+ try {
if (StringUtils.isNotEmpty(e.getInvalidInternalPendingReqId())) {
+ log.debug("Searching for expired pendingRequest with Id: {} ... ", e.getInvalidInternalPendingReqId());
invalidPendingRequest =
transactionStorage.get(e.getInvalidInternalPendingReqId(), IRequest.class);
+ log.debug("{} expired pendingReq. Set it into Exception ...",
+ invalidPendingRequest != null ? "Find" : "Find NO ");
+
+ } else {
+ log.debug("Get no internal pendingRequestId. Expired pendingRequest can not be set");
+
}
} catch (final EaafException e1) {
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/AbstractController.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/AbstractController.java
index 41c7a432..0479a8c5 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/AbstractController.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/AbstractController.java
@@ -181,7 +181,7 @@ public abstract class AbstractController {
final byte[] serializedError = SerializationUtils.serialize(
new ExceptionContainer(errorToHandle.getFirst(), errorToHandle.getSecond()));
- log.trace("Put 'ExceptionContainer' into cache ... ");
+ log.debug("Put 'ExceptionContainer' into cache with id: {}... ", errorKey);
transactionStorage.put(errorKey, serializedError, -1);
} else {
@@ -189,7 +189,7 @@ public abstract class AbstractController {
final byte[] serializedError = SerializationUtils.serialize(
new ExceptionContainer(null, errorToHandle.getSecond()));
- log.trace("Put 'ExceptionContainer' into cache ... ");
+ log.trace("Put 'ExceptionContainer' into cache with id: {}... ",errorKey);
transactionStorage.put(errorKey, serializedError, -1);
}
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/ProtocolFinalizationController.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/ProtocolFinalizationController.java
index 2a8dd756..9511f46e 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/ProtocolFinalizationController.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/ProtocolFinalizationController.java
@@ -76,6 +76,7 @@ public class ProtocolFinalizationController extends AbstractController {
IRequest pendingReq = null;
try {
String errorId = requestIdValidationStragegy.validateAndGetPendingRequestId(errorToken);
+ log.debug("Searching exception with internal error-token: {}", errorId);
// load stored exception from database
final byte[] containerSerialized =
@@ -83,7 +84,8 @@ public class ProtocolFinalizationController extends AbstractController {
if (containerSerialized != null) {
// remove exception if it was found
transactionStorage.remove(errorId);
-
+ log.trace("Find exception with internal error-token: {}", errorId);
+
//final Object containerObj = EaafSerializationUtils.deserialize(containerSerialized,
// Arrays.asList(
// ExceptionContainer.class.getName()
@@ -115,6 +117,7 @@ public class ProtocolFinalizationController extends AbstractController {
}
} else {
+ log.info("Find no exception with internal error-token: {}", errorId);
protAuthService.handleErrorNoRedirect(
new EaafException(IStatusMessenger.CODES_INTERNAL_ERROR_AUTH_NOPENDIGREQID, null),
req, resp, false);