File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
src/main/kotlin/com/wafflestudio/internhasha/email/service Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ import com.wafflestudio.internhasha.coffeeChat.persistence.CoffeeChatEntity
55import com.wafflestudio.internhasha.coffeeChat.service.CoffeeChatService
66import com.wafflestudio.internhasha.email.EmailSendFailureException
77import com.wafflestudio.internhasha.email.EmailType
8+ import org.slf4j.Logger
9+ import org.slf4j.LoggerFactory
810import org.springframework.beans.factory.annotation.Value
911import org.springframework.context.annotation.Lazy
1012import 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 }
You can’t perform that action at this time.
0 commit comments