diff --git a/mobile/lib/services/machine_learning/ml_service.dart b/mobile/lib/services/machine_learning/ml_service.dart index ef428f3946..e3e41c73d2 100644 --- a/mobile/lib/services/machine_learning/ml_service.dart +++ b/mobile/lib/services/machine_learning/ml_service.dart @@ -495,7 +495,7 @@ class MLService { return true; } _logger.severe( - "Failed to analyze using FaceML for image with ID: ${instruction.file.uploadedFileID}. Not storing any results locally, which means it will be automatically retried later.", + "Failed to analyze using FaceML for image with ID: ${instruction.file.uploadedFileID} and format ${instruction.file.displayName.split('.').last} (${instruction.file.fileType}). Not storing any results locally, which means it will be automatically retried later.", e, s, ); diff --git a/mobile/lib/utils/ml_util.dart b/mobile/lib/utils/ml_util.dart index 13fb1474c7..e07740acba 100644 --- a/mobile/lib/utils/ml_util.dart +++ b/mobile/lib/utils/ml_util.dart @@ -299,7 +299,8 @@ Future getImagePathForML(EnteFile enteFile) async { final stopwatch = Stopwatch()..start(); File? file; - if (enteFile.fileType == FileType.video) { + final bool isVideo = enteFile.fileType == FileType.video; + if (isVideo) { try { file = await getThumbnailForUploadedFile(enteFile); } on PlatformException catch (e, s) { @@ -328,8 +329,8 @@ Future getImagePathForML(EnteFile enteFile) async { ); if (imagePath == null) { - _logger.warning( - "Failed to get any data for enteFile with uploadedFileID ${enteFile.uploadedFileID} since its file path is null", + _logger.severe( + "Failed to get any data for enteFile with uploadedFileID ${enteFile.uploadedFileID} and format ${enteFile.displayName.split('.').last} and size ${enteFile.fileSize} since its file path is null (isVideo: $isVideo)", ); throw CouldNotRetrieveAnyFileData(); } diff --git a/mobile/lib/utils/thumbnail_util.dart b/mobile/lib/utils/thumbnail_util.dart index cd67345659..06b26c9be6 100644 --- a/mobile/lib/utils/thumbnail_util.dart +++ b/mobile/lib/utils/thumbnail_util.dart @@ -47,6 +47,7 @@ Future getThumbnail(EnteFile file) async { Future getThumbnailForUploadedFile(EnteFile file) async { final cachedThumbnail = cachedThumbnailPath(file); if (await cachedThumbnail.exists()) { + _logger.info("Thumbnail already exists for ${file.uploadedFileID}"); return cachedThumbnail; } final thumbnail = await getThumbnail(file); @@ -55,8 +56,10 @@ Future getThumbnailForUploadedFile(EnteFile file) async { if (!await cachedThumbnail.exists()) { await cachedThumbnail.writeAsBytes(thumbnail, flush: true); } + _logger.info("Thumbnail obtained for ${file.uploadedFileID}"); return cachedThumbnail; } + _logger.severe("Failed to get thumbnail for ${file.uploadedFileID}"); return null; }