diff --git a/src/main/java/com/krylov/refound/controller/advertising/AdvertisingController.java b/src/main/java/com/krylov/refound/controller/advertising/AdvertisingController.java index 7228e8d..9a6f7e8 100644 --- a/src/main/java/com/krylov/refound/controller/advertising/AdvertisingController.java +++ b/src/main/java/com/krylov/refound/controller/advertising/AdvertisingController.java @@ -39,7 +39,8 @@ public class AdvertisingController { log.info("getNextAdvertising"); Optional selected = advertisingSelectionService.selectAdvertising(authentication, sessionId, request); if (selected.isEmpty()) { - log.warn("failed get advertising"); + // Нормальная ситуация (нет активных реклам / кулдаун / кап) — не ошибка + log.debug("No advertising to show, returning 204"); return ResponseEntity.noContent().build(); } diff --git a/src/main/java/com/krylov/refound/service/advertising/AdvertisingSelectionService.java b/src/main/java/com/krylov/refound/service/advertising/AdvertisingSelectionService.java index 7482474..ac81559 100644 --- a/src/main/java/com/krylov/refound/service/advertising/AdvertisingSelectionService.java +++ b/src/main/java/com/krylov/refound/service/advertising/AdvertisingSelectionService.java @@ -36,13 +36,13 @@ public class AdvertisingSelectionService { String resolvedSessionId = sessionId != null ? sessionId : request.getSession(true).getId(); if (!frequencyService.isSessionCooldownPassed(resolvedSessionId)) { - log.warn("isSessionCooldownPassed by {} resolvedSessionId is empty", resolvedSessionId); + log.debug("Session cooldown not passed for sessionId={}", resolvedSessionId); return Optional.empty(); } List eligible = adRepository.findEligibleAds(LocalDateTime.now()); if (eligible.isEmpty()) { - log.warn("findEligibleAds is empty"); + log.debug("No eligible ads to show"); return Optional.empty(); }