@Override protected void sendEmail( final boolean intercept, final Throwable t, final InternetAddress to, final String emailSubject, final String htmlReport, final String textReport) { String cacheKey = getCacheKey(t, to, intercept); if (logger.isDebugEnabled()) { logger.debug("cacheKey = [" + cacheKey + "]"); } if (cache.get(cacheKey) == null) { if (logger.isDebugEnabled()) { logger.debug("not found in cache"); } super.sendEmail(intercept, t, to, emailSubject, htmlReport, textReport); cache.put(new Element(cacheKey, cacheKey)); } else { if (logger.isDebugEnabled()) { logger.debug("found in cache"); } } }
@Override public ExceptionService getExceptionService() { return new CachingEmailExceptionServiceImpl( getI18nService(), getApplicationService(), getExceptionViews(), getNoEmailExceptions(), getAuthenticationService(), getSmtpService(), getRecipientEmail(), isDoNotSendExceptionReportsToDevelopers(), getDevelEmail(), cache, getLogLevel()); }