Relax logging

This commit is contained in:
Arkadiusz Fal 2022-12-20 21:41:27 +01:00
parent f058b0c30c
commit 41ac15b204
4 changed files with 5 additions and 5 deletions

View File

@ -18,7 +18,7 @@ struct ChannelsCacheModel: CacheModel {
func store(_ channel: Channel) { func store(_ channel: Channel) {
guard channel.hasExtendedDetails else { guard channel.hasExtendedDetails else {
logger.warning("not caching \(channel.cacheKey)") logger.debug("not caching \(channel.cacheKey)")
return return
} }
@ -35,7 +35,7 @@ struct ChannelsCacheModel: CacheModel {
} }
func retrieve(_ cacheKey: String) -> Channel? { func retrieve(_ cacheKey: String) -> Channel? {
logger.info("retrieving cache for \(cacheKey)") logger.debug("retrieving cache for \(cacheKey)")
if let json = try? storage?.object(forKey: cacheKey) { if let json = try? storage?.object(forKey: cacheKey) {
return Channel.from(json) return Channel.from(json)

View File

@ -27,7 +27,7 @@ struct FeedCacheModel: CacheModel {
} }
func retrieveFeed(account: Account) -> [Video] { func retrieveFeed(account: Account) -> [Video] {
logger.info("retrieving cache for \(account.feedCacheKey)") logger.debug("retrieving cache for \(account.feedCacheKey)")
if let json = try? storage?.object(forKey: account.feedCacheKey), if let json = try? storage?.object(forKey: account.feedCacheKey),
let videos = json.dictionaryValue["videos"] let videos = json.dictionaryValue["videos"]

View File

@ -27,7 +27,7 @@ struct PlaylistsCacheModel: CacheModel {
} }
func retrievePlaylists(account: Account) -> [Playlist] { func retrievePlaylists(account: Account) -> [Playlist] {
logger.info("retrieving cache for \(playlistCacheKey(account))") logger.debug("retrieving cache for \(playlistCacheKey(account))")
if let json = try? storage?.object(forKey: playlistCacheKey(account)), if let json = try? storage?.object(forKey: playlistCacheKey(account)),
let playlists = json.dictionaryValue["playlists"] let playlists = json.dictionaryValue["playlists"]

View File

@ -24,7 +24,7 @@ struct VideosCacheModel: CacheModel {
} }
func retrieveVideo(_ cacheKey: String) -> Video? { func retrieveVideo(_ cacheKey: String) -> Video? {
logger.info("retrieving cache for \(cacheKey)") logger.debug("retrieving cache for \(cacheKey)")
if let json = try? storage?.object(forKey: cacheKey) { if let json = try? storage?.object(forKey: cacheKey) {
return Video.from(json) return Video.from(json)