From b745915e493c5fb7f786d301964f648c56ee6a58 Mon Sep 17 00:00:00 2001 From: Harrison Date: Wed, 26 Apr 2023 13:47:09 -0500 Subject: [PATCH] Added some more logging to the INFO level --- renamebycsv/renamer.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/renamebycsv/renamer.py b/renamebycsv/renamer.py index ffd6d2c..542f288 100644 --- a/renamebycsv/renamer.py +++ b/renamebycsv/renamer.py @@ -6,6 +6,12 @@ from typing import Iterable def find_all_candidates(input_dir: str, regex: str, recursive: bool): + logging.info( + 'Searching "%s" for files that match "%s" %s', + input_dir, + regex, + "recursively" if recursive else "non-recursively", + ) results = [] for subitem in os.listdir(input_dir): subitem_path = os.path.join(input_dir, subitem) @@ -19,6 +25,13 @@ def find_all_candidates(input_dir: str, regex: str, recursive: bool): continue results.append((subitem_path, subitem, match)) logging.debug(f'Collecting "{subitem}"...') + if len(results) < 1: + logging.info( + 'No results found matching "%s" in "%s". Please double check your REGEX ' + "pattern and directory being searched.", + regex, + input_dir, + ) return results