diff options
author | Thomas <> | 2022-07-05 17:49:34 +0200 |
---|---|---|
committer | Thomas <> | 2022-07-05 17:49:34 +0200 |
commit | b5766d8107d6e557921f9a694893a1284963ef16 (patch) | |
tree | 708e695bb0c90d958ef0e3cde6008169fb683893 /modules/core_common_webapp | |
parent | 154f7f2a9c8a33d3fedf341df2be62d8404ff77f (diff) | |
parent | 48695aa01a86890990dc4e42b9d44493ec840b25 (diff) | |
download | National_eIDAS_Gateway-b5766d8107d6e557921f9a694893a1284963ef16.tar.gz National_eIDAS_Gateway-b5766d8107d6e557921f9a694893a1284963ef16.tar.bz2 National_eIDAS_Gateway-b5766d8107d6e557921f9a694893a1284963ef16.zip |
Merge branch 'nightlybuild' into feature/ms_proxy_service
Diffstat (limited to 'modules/core_common_webapp')
-rw-r--r-- | modules/core_common_webapp/pom.xml | 2 | ||||
-rw-r--r-- | modules/core_common_webapp/src/main/java/at/asitplus/eidas/specific/core/logger/StatisticLogger.java | 18 |
2 files changed, 16 insertions, 4 deletions
diff --git a/modules/core_common_webapp/pom.xml b/modules/core_common_webapp/pom.xml index c780a367..5f61003f 100644 --- a/modules/core_common_webapp/pom.xml +++ b/modules/core_common_webapp/pom.xml @@ -3,7 +3,7 @@ <parent> <groupId>at.asitplus.eidas.ms_specific</groupId> <artifactId>modules</artifactId> - <version>1.3.1-SNAPSHOT</version> + <version>1.3.2-SNAPSHOT</version> </parent> <artifactId>core_common_webapp</artifactId> <name>WebApplication commons</name> diff --git a/modules/core_common_webapp/src/main/java/at/asitplus/eidas/specific/core/logger/StatisticLogger.java b/modules/core_common_webapp/src/main/java/at/asitplus/eidas/specific/core/logger/StatisticLogger.java index bdaf83f6..22cace10 100644 --- a/modules/core_common_webapp/src/main/java/at/asitplus/eidas/specific/core/logger/StatisticLogger.java +++ b/modules/core_common_webapp/src/main/java/at/asitplus/eidas/specific/core/logger/StatisticLogger.java @@ -30,6 +30,7 @@ import org.slf4j.LoggerFactory; import at.asitplus.eidas.specific.core.MsEidasNodeConstants; import at.gv.egiz.eaaf.core.api.IRequest; +import at.gv.egiz.eaaf.core.api.IStatusMessenger; import at.gv.egiz.eaaf.core.api.idp.IAuthData; import at.gv.egiz.eaaf.core.api.logging.IStatisticLogger; import at.gv.egiz.eaaf.core.exceptions.EaafException; @@ -50,6 +51,7 @@ public class StatisticLogger implements IStatisticLogger { protocolRequest.getRawData(MsEidasNodeConstants.DATA_REQUESTERID), protocolRequest.getServiceProviderConfiguration().getAreaSpecificTargetIdentifier(), authData.getCiticenCountryCode(), + extractMatchingState(protocolRequest.getRawData(MsEidasNodeConstants.DATA_MATCHING_STATE)), STATUS_SUCCESS, StringUtils.EMPTY, StringUtils.EMPTY)); @@ -58,7 +60,7 @@ public class StatisticLogger implements IStatisticLogger { @Override public void logErrorOperation(Throwable throwable) { - String errorId = "TODO"; + String errorId = IStatusMessenger.CODES_INTERNAL_ERROR_GENERIC; if (throwable instanceof EaafException) { errorId = ((EaafException) throwable).getErrorId(); } @@ -69,6 +71,7 @@ public class StatisticLogger implements IStatisticLogger { StringUtils.EMPTY, StringUtils.EMPTY, StringUtils.EMPTY, + StringUtils.EMPTY, STATUS_ERROR, errorId, throwable.getMessage())); @@ -89,6 +92,7 @@ public class StatisticLogger implements IStatisticLogger { errorRequest.getRawData(MsEidasNodeConstants.DATA_REQUESTERID), errorRequest.getServiceProviderConfiguration().getAreaSpecificTargetIdentifier(), StringUtils.EMPTY, + extractMatchingState(errorRequest.getRawData(MsEidasNodeConstants.DATA_MATCHING_STATE)), STATUS_ERROR, errorId, throwable.getMessage())); @@ -99,6 +103,7 @@ public class StatisticLogger implements IStatisticLogger { StringUtils.EMPTY, StringUtils.EMPTY, StringUtils.EMPTY, + StringUtils.EMPTY, STATUS_ERROR, errorId, throwable.getMessage())); @@ -112,8 +117,13 @@ public class StatisticLogger implements IStatisticLogger { } + private String extractMatchingState(Object state) { + return state != null ? state.toString() : MsEidasNodeConstants.MatchingStates.NO_REQUIRED.toString(); + + } + private String buildLogMessage(String transId, String entityId, Object requesterId, String target, - String cc, + String cc, String matchingState, String status, String errorCode, String errorMsg) { String logMsg = StringUtils.EMPTY; @@ -131,7 +141,9 @@ public class StatisticLogger implements IStatisticLogger { logMsg += target + ","; logMsg += cc + ","; - + + logMsg += matchingState + ","; + logMsg += status + ","; logMsg += errorCode + ","; logMsg += errorMsg; |