diff --git a/components/central-logger/org.wso2.carbon.identity.central.log.mgt/src/main/java/org/wso2/carbon/identity/central/log/mgt/utils/LoggerUtils.java b/components/central-logger/org.wso2.carbon.identity.central.log.mgt/src/main/java/org/wso2/carbon/identity/central/log/mgt/utils/LoggerUtils.java index 0d4ed6a6af8b..5d20993137ab 100644 --- a/components/central-logger/org.wso2.carbon.identity.central.log.mgt/src/main/java/org/wso2/carbon/identity/central/log/mgt/utils/LoggerUtils.java +++ b/components/central-logger/org.wso2.carbon.identity.central.log.mgt/src/main/java/org/wso2/carbon/identity/central/log/mgt/utils/LoggerUtils.java @@ -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 @@ -168,6 +168,11 @@ public static void triggerDiagnosticLogEvent(DiagnosticLog.DiagnosticLogBuilder try { Map 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);