Add logging

This commit is contained in:
2024-05-27 06:51:33 +00:00
committed by GitHub
parent bb4ba0456d
commit 89b2d33f76
5 changed files with 27 additions and 24 deletions

View File

@@ -92,8 +92,8 @@ class DioImage extends ImageProvider<DioImage> {
final buffer = await ui.ImmutableBuffer.fromUint8List(cache!.$1);
return decode(buffer);
}
} catch (e) {
_log.warning("Failed to get cache for ${url.toString()}: $e");
} catch (e, stack) {
_log.warning("Failed to get cache for ${url.toString()}: $e\n$stack");
}
}
@@ -128,8 +128,8 @@ class DioImage extends ImageProvider<DioImage> {
try {
await imageCaches.putCache(url.toString(), bytes,
response.headers.map, response.realUri.toString());
} catch (e) {
_log.warning("Failed to put cache for ${url.toString()}: $e");
} catch (e, stack) {
_log.warning("Failed to put cache for ${url.toString()}: $e\n$stack");
}
}