Skip to content

Commit 7abd691

Browse files
committed
feat: logging 추가
1 parent 56ebcab commit 7abd691

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

tuk-api/src/main/kotlin/nexters/tuk/application/device/DeviceService.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ class DeviceService(
1717
memberId: Long,
1818
command: DeviceCommand.UpdateDeviceToken,
1919
): DeviceResponse.UpdateDeviceToken {
20-
val deviceToken =
21-
command.deviceInfo.deviceToken ?: throw IllegalArgumentException("디바이스 토큰은 필수 정보입니다.")
20+
val deviceToken = command.deviceInfo.deviceToken
21+
require(!deviceToken.isNullOrBlank()) { "디바이스 토큰은 필수 정보입니다." }
2222

2323
val device = deviceRepository.findByDeviceIdAndMemberId(
2424
deviceId = command.deviceInfo.deviceId,

tuk-api/src/main/kotlin/nexters/tuk/application/push/PushService.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,10 @@ class PushService(
3939
memberIds: List<Long>,
4040
pushMessage: PushMessage,
4141
) {
42+
logger.info("PushService.pushAll -> memberIds: $memberIds")
4243
val memberNameMap = memberService.getMembers(memberIds).associate { it.memberId to it.memberName }
4344
deviceService.getDeviceTokens(memberIds).forEach { token ->
45+
if (token.deviceToken.isBlank()) return@forEach
4446
pushSender.send(
4547
deviceTokens = listOf(DeviceToken(token.deviceToken)),
4648
message = PushCommand.MessagePayload(

tuk-api/src/main/resources/application.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ spring:
1111
jpa:
1212
hibernate:
1313
ddl-auto: none
14-
show-sql: true
14+
show-sql: false
1515
properties:
1616
hibernate:
1717
dialect: org.hibernate.dialect.MySQLDialect

0 commit comments

Comments
 (0)