Skip to content

Commit

Permalink
Merge pull request #283 from wso2-extensions/revert-271-remove-debug-…
Browse files Browse the repository at this point in the history
…logs

Revert "[Temporary Fix] Remove debug logs"
  • Loading branch information
sadilchamishka authored Nov 20, 2024
2 parents 8f0baa7 + b42284e commit c18a53c
Showing 1 changed file with 25 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,22 +238,16 @@ public static Map<String, String> getPlaceholderValues(EmailTemplate emailTempla
.equals(e.getErrorCode())) {
brandingPreferences = null;
} else {
// if (log.isDebugEnabled()) {
// String message =
// "Error occurred while retrieving branding preferences for organization " +
// placeHolderData.get(TENANT_DOMAIN);
// log.debug(message, e);
// }
// Ignore
if (log.isDebugEnabled()) {
String message = "Error occurred while retrieving branding preferences for organization " + placeHolderData.get(TENANT_DOMAIN);
log.debug(message, e);
}
}
} catch (Exception e) {
// if (log.isDebugEnabled()) {
// String message =
// "Error occurred while retrieving branding preferences for organization " + placeHolderData
// .get(TENANT_DOMAIN);
// log.debug(message, e);
// }
// Ignore
if (log.isDebugEnabled()) {
String message = "Error occurred while retrieving branding preferences for organization " + placeHolderData.get(TENANT_DOMAIN);
log.debug(message, e);
}
}
}

Expand Down Expand Up @@ -385,27 +379,25 @@ public static String getCopyrightPlaceholderValueFromCustomTexts(String tenantDo
} catch (BrandingPreferenceMgtException e) {
if (BrandingPreferenceMgtConstants.ErrorMessages.ERROR_CODE_CUSTOM_TEXT_PREFERENCE_NOT_EXISTS.getCode()
.equals(e.getErrorCode())) {
// if (log.isDebugEnabled()) {
// String message = "Custom text preferences are not configured for the organization: "
// + tenantDomain + " with locale: " + locale;
// log.debug(message, e);
// }
if (log.isDebugEnabled()) {
String message = "Custom text preferences are not configured for the organization: "
+ tenantDomain + " with locale: " + locale;
log.debug(message, e);
}
customTextPreference = null;
} else {
// if (log.isDebugEnabled()) {
// String message = "Error occurred while retrieving custom text preferences for organization "
// + tenantDomain;
// log.debug(message, e);
// }
// Ignore
if (log.isDebugEnabled()) {
String message = "Error occurred while retrieving custom text preferences for organization "
+ tenantDomain;
log.debug(message, e);
}
}
} catch (Exception e) {
// if (log.isDebugEnabled()) {
// String message = "Error occurred while retrieving custom text preferences for organization "
// + tenantDomain;
// log.debug(message, e);
// }
// Ignore
if (log.isDebugEnabled()) {
String message = "Error occurred while retrieving custom text preferences for organization "
+ tenantDomain;
log.debug(message, e);
}
}

if (customTextPreference != null) {
Expand Down Expand Up @@ -722,12 +714,10 @@ public static Notification buildNotification(Event event, Map<String, String> pl
.getApplicationBasicInfoByName(applicationName, applicationDomain)
.getApplicationResourceId();
} catch (IdentityApplicationManagementException | NullPointerException e) {
// log.debug("Fallback to organization preference. Error fetching application id for application name: " + applicationName, e);
// ignore
log.debug("Fallback to organization preference. Error fetching application id for application name: " + applicationName, e);
}
} else {
// log.debug("Fallback to organization preference. Cannot get application id or application name from the event");
// ignore
log.debug("Fallback to organization preference. Cannot get application id or application name from the event");
}

emailTemplateExists = NotificationHandlerDataHolder.getInstance().getEmailTemplateManager()
Expand Down

0 comments on commit c18a53c

Please sign in to comment.