Skip to content

Commit

Permalink
Added match identified api context with the log properties
Browse files Browse the repository at this point in the history
  • Loading branch information
shnrndk committed Jul 25, 2023
1 parent 23a7904 commit de3deca
Showing 1 changed file with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,16 @@ protected static String getMatchingLogLevel(MessageContext messageContext,
for (Map.Entry<Map<String, String>, String> entry : logProperties.entrySet()) {
Map<String, String> key = entry.getKey();
//if resource path is empty, proceeding with API level logs
if (key.get("resourcePath") == null && key.get("resourceMethod") == null) {
apiLogLevel = entry.getValue();
//matching the methods first and then the resource path
} else if (httpMethod.equals(key.get("resourceMethod"))) {
if (helper.getString().equals(key.get("resourcePath"))) {
resourceLogLevel = entry.getValue();
resourcePath = key.get("resourcePath");
resourceMethod = key.get("resourceMethod");
if (selectedApi.getContext().equals(key.get("context"))) {
if (key.get("resourcePath") == null && key.get("resourceMethod") == null) {
apiLogLevel = entry.getValue();
//matching the methods first and then the resource path
} else if (httpMethod.equals(key.get("resourceMethod"))) {
if (helper.getString().equals(key.get("resourcePath"))) {
resourceLogLevel = entry.getValue();
resourcePath = key.get("resourcePath");
resourceMethod = key.get("resourceMethod");
}
}
}
}
Expand Down

0 comments on commit de3deca

Please sign in to comment.