Skip to content

Commit

Permalink
Issue #145 feat:More logging in Dao layer
Browse files Browse the repository at this point in the history
  • Loading branch information
SumitSamajpati committed May 8, 2018
1 parent 789517c commit db15a1f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ public Map<String, Object> execute(Map<String, Object> mapObject) throws Middlew
String token = tokenObject.toString();
try {
if (!keyCloakServiceImpl.verifyToken(token).trim().isEmpty()) {
/* if(mapObject.containsKey("userName")) {
if (mapObject.containsKey("userName")) {
logger.info("Access token for user {} verified successfully with KeyCloak server !", mapObject.get("userName"));
}else {*/
} else {
logger.info("Access token verified successfully with KeyCloak server !");
// }
}
AuthInfo authInfo = extractTokenIntoAuthInfo(token);
if (authInfo.getSub() == null || authInfo.getAud() == null || authInfo.getName() == null) {
throw new MiddlewareHaltException(TOKEN_IS_INVALID);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,12 @@ private void verifyAndDelete(Vertex dbSourceVertex, Edge e, Optional<Edge> edgeA
* @throws AuditFailedException
*/
private void deleteEdgeAndNode(Vertex v, Edge dbEdgeToBeRemoved, Vertex dbVertexToBeDeleted) throws AuditFailedException{
logger.info("Deleting edge and node for edge-label : {} , vertex-label : {}", dbEdgeToBeRemoved.label(),dbVertexToBeDeleted.label());
if(dbVertexToBeDeleted !=null) {
logger.info("Deleting edge and node for edge-label : {} , vertex-label : {}", dbEdgeToBeRemoved.label(), dbVertexToBeDeleted.label());
}else{
logger.info("Deleting edge and node for edge-label : {} ", dbEdgeToBeRemoved.label());
}

if(dbVertexToBeDeleted == null){
dbVertexToBeDeleted = dbEdgeToBeRemoved.inVertex();
}
Expand Down

0 comments on commit db15a1f

Please sign in to comment.