fix #2772 Refine thumbnail creation failure logs

This commit is contained in:
Shinsuke Sugaya 2023-10-12 16:19:53 +09:00
parent 1d0dc43f00
commit 9ff28a173d

View file

@ -108,11 +108,10 @@ public class HtmlTagBasedGenerator extends BaseThumbnailGenerator {
break;
}
} catch (final Throwable t) {
logger.warn("Failed to create thumbnail: {} -> {} ({}:{})", thumbnailId, responseData.getUrl(),
t.getClass().getCanonicalName(), t.getMessage());
if (logger.isDebugEnabled()) {
logger.warn("Failed to create thumbnail: {} -> {}", thumbnailId, responseData.getUrl(), t);
} else {
logger.warn("Failed to create thumbnail: {} -> {} ({}:{})", thumbnailId, responseData.getUrl(),
t.getClass().getCanonicalName(), t.getMessage());
logger.debug("Details for failed thumbnail creation.", t);
}
} finally {
if (!created) {