From 4395dd46469d47ac188ffcbf9d556031db431a00 Mon Sep 17 00:00:00 2001 From: Serene-Arc Date: Sat, 22 May 2021 11:47:48 +1000 Subject: [PATCH] Update logging messages to include submission IDs --- bdfr/downloader.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bdfr/downloader.py b/bdfr/downloader.py index 2e47ae9..cc4e8bb 100644 --- a/bdfr/downloader.py +++ b/bdfr/downloader.py @@ -70,7 +70,7 @@ class RedditDownloader(RedditConnector): return for destination, res in self.file_name_formatter.format_resource_paths(content, self.download_directory): if destination.exists(): - logger.debug(f'File {destination} already exists, continuing') + logger.debug(f'File {destination} from submission {submission.id} already exists, continuing') continue elif not self.download_filter.check_resource(res): logger.debug(f'Download filter removed {submission.id} with URL {submission.url}') @@ -91,7 +91,8 @@ class RedditDownloader(RedditConnector): elif self.args.make_hard_links: self.master_hash_list[resource_hash].link_to(destination) logger.info( - f'Hard link made linking {destination} to {self.master_hash_list[resource_hash]}') + f'Hard link made linking {destination} to {self.master_hash_list[resource_hash]}' + f' in submission {submission.id}') return with open(destination, 'wb') as file: file.write(res.content)