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
sadilchamishka authored and WSO2 committed May 13, 2024
1 parent aeba443 commit 78019d9
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, WSO2 LLC. (https://www.wso2.com).
* Copyright (c) 2021-2024, WSO2 LLC. (https://www.wso2.com).
*
* WSO2 LLC. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
Expand Down Expand Up @@ -168,6 +168,11 @@ public static void triggerDiagnosticLogEvent(DiagnosticLog.DiagnosticLogBuilder
try {
Map<String, Object> diagnosticLogProperties = new HashMap<>();
DiagnosticLog diagnosticLog = diagnosticLogBuilder.build();
/* As the console application is used to manage the identity server, the diagnostic logs are not required
to be emitted. */
if ("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 78019d9

Please sign in to comment.