diff --git a/src/main/java/cc/fascinated/bat/service/SpotifyService.java b/src/main/java/cc/fascinated/bat/service/SpotifyService.java index 9998263..661e191 100644 --- a/src/main/java/cc/fascinated/bat/service/SpotifyService.java +++ b/src/main/java/cc/fascinated/bat/service/SpotifyService.java @@ -7,6 +7,8 @@ import lombok.Getter; import lombok.NonNull; import lombok.SneakyThrows; import net.jodah.expiringmap.ExpiringMap; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import se.michaelthelin.spotify.SpotifyApi; @@ -24,6 +26,7 @@ import java.util.concurrent.TimeUnit; @Service @Getter public class SpotifyService { + private static final Logger log = LoggerFactory.getLogger(SpotifyService.class); /** * The access token map. */ @@ -198,6 +201,7 @@ public class SpotifyService { api.setAccessToken(credentials.getAccessToken()); api.setRefreshToken(credentials.getRefreshToken()); userService.saveUser(user); + log.info("Refreshed spotify access token for user {}", user.getName()); } return api; }