Skip to content

Commit f30be45

Browse files
authored
Merge pull request #291 from JimPanic/patch-1
Decrease size of log output
2 parents cd197aa + 3ff5d6c commit f30be45

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

modules/simple-java-mail/src/main/java/org/simplejavamail/mailer/internal/SendMailClosure.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,16 @@ public void executeClosure() {
6363
TransportRunner.sendMessage(operationalConfig.getClusterKey(), session, message, message.getAllRecipients());
6464
}
6565
} catch (final UnsupportedEncodingException e) {
66-
LOGGER.error("Failed to send email:\n{}", email);
66+
LOGGER.error("Failed to send email:\n{}", email.getId());
67+
LOGGER.trace("{}", email);
6768
throw new MailerException(MailerException.INVALID_ENCODING, e);
6869
} catch (final MessagingException e) {
69-
LOGGER.error("Failed to send email:\n{}", email);
70+
LOGGER.error("Failed to send email:\n{}", email.getId());
71+
LOGGER.trace("{}", email);
7072
throw new MailerException(MailerException.GENERIC_ERROR, e);
7173
} catch (final Exception e) {
72-
LOGGER.error("Failed to send email:\n{}", email);
74+
LOGGER.error("Failed to send email:\n{}", email.getId());
75+
LOGGER.trace("{}", email);
7376
throw e;
7477
}
7578
}

0 commit comments

Comments
 (0)