Skip to content

Commit

Permalink
Skip diagnostic logs publish for console app
Browse files Browse the repository at this point in the history
  • Loading branch information
WSO2 committed May 13, 2024
1 parent 375ba6d commit 1f68f8d
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,13 @@ public static void triggerDiagnosticLogEvent(String componentId, Map<String, Obj
String flowId = MDC.get(FLOW_ID_MDC);
DiagnosticLog diagnosticLog = new DiagnosticLog(id, recordedAt, requestId, flowId, resultStatus,
resultMessage, actionId, componentId, input, configurations);
/* As the console application is used to manage the identity server, the diagnostic logs are not required
to be emitted. */
if (diagnosticLog.getInput() != null &&
("CONSOLE".equals(diagnosticLog.getInput().get(LogConstants.InputKeys.CLIENT_ID)) ||
"CONSOLE".equals(diagnosticLog.getInput().get("client_id")))) {
return;
}
IdentityEventService eventMgtService =
CentralLogMgtServiceComponentHolder.getInstance().getIdentityEventService();
diagnosticLogProperties.put(CarbonConstants.LogEventConstants.DIAGNOSTIC_LOG, diagnosticLog);
Expand Down

0 comments on commit 1f68f8d

Please sign in to comment.