Update logging messages to include submission IDs

This commit is contained in:
Serene-Arc
2021-05-22 11:47:48 +10:00
committed by Serene
parent da72d8ac2d
commit 4395dd4646

View File

@@ -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)