aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ms_specific_connector/src/main/java/at/asitplus/eidas/specific/core/logger/AdvancedStatisicLogger.java27
1 files changed, 22 insertions, 5 deletions
diff --git a/ms_specific_connector/src/main/java/at/asitplus/eidas/specific/core/logger/AdvancedStatisicLogger.java b/ms_specific_connector/src/main/java/at/asitplus/eidas/specific/core/logger/AdvancedStatisicLogger.java
index 6cbe11bf..cfa93286 100644
--- a/ms_specific_connector/src/main/java/at/asitplus/eidas/specific/core/logger/AdvancedStatisicLogger.java
+++ b/ms_specific_connector/src/main/java/at/asitplus/eidas/specific/core/logger/AdvancedStatisicLogger.java
@@ -38,7 +38,7 @@ import lombok.extern.slf4j.Slf4j;
@Slf4j
public class AdvancedStatisicLogger implements IStatisticLogger {
- private static final String DATEFORMATER = "yyyy.MM.dd-HH:mm:ss+z";
+ private static final String DATEFORMATER = "yyyy.MM.dd-HH:mm:ss";
private static final String DEFAULT_NO_IDP_ID = "no idpId available";
private static final String DEFAULT_NO_SP_ID = "no appId available";
@@ -62,9 +62,11 @@ public class AdvancedStatisicLogger implements IStatisticLogger {
entry.setSuccess(SuccessEntry.builder()
.spSector(protocolRequest.getServiceProviderConfiguration().getAreaSpecificTargetIdentifier())
.citizenCountryCode(authData.getCiticenCountryCode())
+ .build());
+ entry.setMatching(MatchingDetails.builder()
.matchingMethod(extractMatchingState(protocolRequest))
- .matchingDetails(extractMatchingDetails(protocolRequest))
- .build());
+ .matchingDetails(extractMatchingDetails(protocolRequest))
+ .build());
writeEntryToLog(entry);
}
@@ -79,6 +81,10 @@ public class AdvancedStatisicLogger implements IStatisticLogger {
public void logErrorOperation(Throwable throwable, IRequest errorRequest) {
final StatisticLogEntry entry = buildCoreEntry(errorRequest);
entry.setError(new ErrorEntry(messageService.getResponseErrorCode(throwable), throwable.getMessage()));
+ entry.setMatching(MatchingDetails.builder()
+ .matchingMethod(extractMatchingState(errorRequest))
+ .matchingDetails(extractMatchingDetails(errorRequest))
+ .build());
writeEntryToLog(entry);
}
@@ -161,6 +167,9 @@ public class AdvancedStatisicLogger implements IStatisticLogger {
@JsonProperty("error")
private ErrorEntry error;
+
+ @JsonProperty("idenityMatching")
+ private MatchingDetails matching;
}
@@ -175,15 +184,23 @@ public class AdvancedStatisicLogger implements IStatisticLogger {
@JsonProperty("ccc")
private final String citizenCountryCode;
+
+ }
+
+ @Getter
+ @Setter
+ @Builder
+ @JsonInclude(Include.NON_NULL)
+ private static class MatchingDetails {
@JsonProperty("finalMatchingMethod")
private final String matchingMethod;
@JsonProperty("matchingProcessDetails")
private final DetailedMatchtingStatistic matchingDetails;
-
+
}
-
+
@Getter
@Setter
@RequiredArgsConstructor