1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-13 05:38:25 -05:00

log domain with warnings

This commit is contained in:
Kyle Spearrin
2018-08-25 16:59:54 -04:00
parent e7dbe6d4be
commit 6f7d07530a
2 changed files with 7 additions and 6 deletions

View File

@ -58,7 +58,7 @@ namespace Bit.Icons.Controllers
var result = await _iconFetchingService.GetIconAsync(domain);
if(result == null)
{
_logger.LogInformation("Null result returned.");
_logger.LogWarning("Null result returned for {0}.", domain);
icon = null;
}
else
@ -69,7 +69,7 @@ namespace Bit.Icons.Controllers
// Only cache not found and smaller images (<= 50kb)
if(_iconsSettings.CacheEnabled && (icon == null || icon.Image.Length <= 50012))
{
_logger.LogInformation("Cache the icon.");
_logger.LogWarning("Cache the icon for {0}.", domain);
_memoryCache.Set(mappedDomain, icon, new MemoryCacheEntryOptions
{
AbsoluteExpirationRelativeToNow = new TimeSpan(_iconsSettings.CacheHours, 0, 0),