diff --git a/src/main/kotlin/roomescape/payment/infrastructure/client/TosspayClient.kt b/src/main/kotlin/roomescape/payment/infrastructure/client/TosspayClient.kt index c8ea2652..1a1fdb86 100644 --- a/src/main/kotlin/roomescape/payment/infrastructure/client/TosspayClient.kt +++ b/src/main/kotlin/roomescape/payment/infrastructure/client/TosspayClient.kt @@ -29,13 +29,13 @@ class TosspayClient( orderId: String, amount: Int, ): PaymentClientConfirmResponse { + val startTime = System.currentTimeMillis() log.info { "[TosspayClient.confirm] 결제 승인 요청: paymentKey=$paymentKey, orderId=$orderId, amount=$amount" } return confirmClient.request(paymentKey, orderId, amount) .also { - log.info { "[TosspayClient.confirm] 결제 승인 완료: response=$it" } + log.info { "[TosspayClient.confirm] 결제 승인 완료: duration_ms=${System.currentTimeMillis() - startTime}ms, paymentKey=$paymentKey" } } - } fun cancel( @@ -43,10 +43,11 @@ class TosspayClient( amount: Int, cancelReason: String ): PaymentClientCancelResponse { + val startTime = System.currentTimeMillis() log.info { "[TosspayClient.cancel] 결제 취소 요청: paymentKey=$paymentKey, amount=$amount, cancelReason=$cancelReason" } return cancelClient.request(paymentKey, amount, cancelReason).also { - log.info { "[TosspayClient.cancel] 결제 취소 완료: response=$it" } + log.info { "[TosspayClient.cancel] 결제 취소 완료: duration_ms=${System.currentTimeMillis() - startTime}ms, paymentKey=$paymentKey" } } } }