Skip to content

Commit 328975f

Browse files
committed
refactor/update logging level in CommonsEmailWrapper to debug for email sending operations
1 parent 7fb6171 commit 328975f

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

‎obp-api/src/main/scala/code/api/util/CommonsEmailWrapper.scala‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,11 @@ object CommonsEmailWrapper extends MdcLoggable {
7979
}
8080

8181
/**
82-
* Send simple text email
82+
* Send a simple text email
8383
*/
8484
def sendTextEmail(config: EmailConfig, content: EmailContent): Box[String] = {
8585
try {
86-
logger.info(s"Sending text email from ${content.from} to ${content.to.mkString(", ")}")
86+
logger.debug(s"Sending text email from ${content.from} to ${content.to.mkString(", ")}")
8787

8888
val email = new SimpleEmail()
8989
configureEmail(email, config, content)
@@ -95,7 +95,7 @@ object CommonsEmailWrapper extends MdcLoggable {
9595
}
9696

9797
val messageId = email.send()
98-
logger.info(s"Email sent successfully with Message-ID: $messageId")
98+
logger.debug(s"Email sent successfully with Message-ID: $messageId")
9999
Full(messageId)
100100
} catch {
101101
case e: Exception =>
@@ -109,7 +109,7 @@ object CommonsEmailWrapper extends MdcLoggable {
109109
*/
110110
def sendHtmlEmail(config: EmailConfig, content: EmailContent): Box[String] = {
111111
try {
112-
logger.info(s"Sending HTML email from ${content.from} to ${content.to.mkString(", ")}")
112+
logger.debug(s"Sending HTML email from ${content.from} to ${content.to.mkString(", ")}")
113113

114114
val email = new HtmlEmail()
115115
configureEmail(email, config, content)
@@ -124,7 +124,7 @@ object CommonsEmailWrapper extends MdcLoggable {
124124
content.textContent.foreach(email.setTextMsg)
125125

126126
val messageId = email.send()
127-
logger.info(s"HTML email sent successfully with Message-ID: $messageId")
127+
logger.debug(s"HTML email sent successfully with Message-ID: $messageId")
128128
Full(messageId)
129129
} catch {
130130
case e: Exception =>
@@ -138,7 +138,7 @@ object CommonsEmailWrapper extends MdcLoggable {
138138
*/
139139
def sendEmailWithAttachments(config: EmailConfig, content: EmailContent): Box[String] = {
140140
try {
141-
logger.info(s"Sending email with attachments from ${content.from} to ${content.to.mkString(", ")}")
141+
logger.debug(s"Sending email with attachments from ${content.from} to ${content.to.mkString(", ")}")
142142

143143
val email = new MultiPartEmail()
144144
configureEmail(email, config, content)
@@ -150,7 +150,7 @@ object CommonsEmailWrapper extends MdcLoggable {
150150
content.attachments.foreach(email.attach)
151151

152152
val messageId = email.send()
153-
logger.info(s"Email with attachments sent successfully with Message-ID: $messageId")
153+
logger.debug(s"Email with attachments sent successfully with Message-ID: $messageId")
154154
Full(messageId)
155155
} catch {
156156
case e: Exception =>

0 commit comments

Comments
 (0)