Skip to content

Commit 12a6e35

Browse files
authored
fix/#215/endermaru (#216)
1 parent 580d3ce commit 12a6e35

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/kotlin/com/wafflestudio/internhasha/email/service/EmailService.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import com.wafflestudio.internhasha.coffeeChat.persistence.CoffeeChatEntity
55
import com.wafflestudio.internhasha.coffeeChat.service.CoffeeChatService
66
import com.wafflestudio.internhasha.email.EmailSendFailureException
77
import com.wafflestudio.internhasha.email.EmailType
8+
import org.slf4j.Logger
9+
import org.slf4j.LoggerFactory
810
import org.springframework.beans.factory.annotation.Value
911
import org.springframework.context.annotation.Lazy
1012
import org.springframework.mail.javamail.JavaMailSender
@@ -22,6 +24,8 @@ class EmailService(
2224
@Value("\${custom.domain-name}") private val domainName: String,
2325
@Value("\${custom.protocol}") private val protocol: String,
2426
) {
27+
private val logger: Logger = LoggerFactory.getLogger(EmailService::class.java)
28+
2529
@Async
2630
fun sendEmail(
2731
type: EmailType,
@@ -100,6 +104,7 @@ class EmailService(
100104

101105
mailSender.send(message)
102106
} catch (ex: Exception) {
107+
logger.error("이메일 전송 실패: 대상 = $to, 타입 = $type", ex)
103108
throw EmailSendFailureException()
104109
}
105110
}

0 commit comments

Comments
 (0)