Skip to content

Commit

Permalink
Added logger
Browse files Browse the repository at this point in the history
Signed-off-by: dhanendra06 <[email protected]>
  • Loading branch information
dhanendra06 committed Sep 25, 2024
1 parent a958a31 commit 76ea2f7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,13 @@ private void handleCredentialIssued(EventModel eventModel) throws IdAuthenticati

private void handleRemoveId(EventModel eventModel) throws IdAuthenticationBusinessException {
Event event = eventModel.getEvent();

Map<String, Object> additionalData = event.getData();
String idHash = (String) additionalData.get(ID_HASH);
mosipLogger.info(">>>>>handleRemoveId event received, idHash value: {}",idHash);
if (idHash != null && !idHash.isEmpty() && identityCacheRepo.existsById(idHash)) {
identityCacheRepo.deleteById(idHash);
mosipLogger.info(">>>>> deleted idHash value: {}",idHash);
removeIdStatusEventPublisher.publishRemoveIdStatusEvent(idHash);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,14 @@ protected void doRegister() {

public void publishRemoveIdStatusEvent(String idHash) {
RemoveIdStatusEvent removeIdStatusEvent = createRemoveIdStatusEvent(idHash);
webSubHelper.publishEvent(removeIdStatusTopic,
webSubHelper.createEventModel(removeIdStatusTopic, removeIdStatusEvent));
logger.info(">>>>>>> removeIdStatusEvent :{}",removeIdStatusEvent);
try {
webSubHelper.publishEvent(removeIdStatusTopic,
webSubHelper.createEventModel(removeIdStatusTopic, removeIdStatusEvent));
}catch (Exception e){
logger.error("removeIdStatus publish Event Error :{}",e.getMessage());
}

}

/**
Expand Down

0 comments on commit 76ea2f7

Please sign in to comment.