basic logging level changes

This commit is contained in:
Jun-te Kim 2025-03-04 08:58:41 +00:00
parent 828065f0b8
commit 7537d0405b
3 changed files with 5 additions and 4 deletions

View file

@ -1,16 +1,17 @@
import os
import logging
from utils.logger import Logger
class RetroHomeFileStructureValidator():
def __init__(self, source_loc_path):
self.source_path = source_loc_path
self.logger = Logger(name='RetroHomeFileStructureValidator').get_logger()
self.logger = Logger(name='RetroHomeFileStructureValidator', level=logging.DEBUG).get_logger()
self.innocent = []
self.guilty = []
self.validate()
def validate(self):
self.logger.info(f"Starting File Structure Validation on '{self.source_path}'")
self.logger.debug(f"Starting File Structure Validation on '{self.source_path}'")
for filepath in os.listdir(self.source_path):
if os.path.isdir(os.path.join(self.source_path, filepath)):
@ -18,7 +19,7 @@ class RetroHomeFileStructureValidator():
else:
self.logger.warning(f"Found a file when expecting directory. Ignoring file {filepath}")
self.logger.info(self.innocent)
self.logger.debug(self.innocent)
self.valid_name()
self.valid_file_structure()

View file

@ -1,5 +1,5 @@
import os
from validator.retrohome import RetroHomeFileStructureValidator
from filePathValidator.retrohome import RetroHomeFileStructureValidator
DATA_LOC = "/workspaces/survey-extraction/data/"
INTERESTING_FILE_LOC = "/workspaces/survey-extraction/data/first last/Submission 03.03.25/customer/10 Sandbeck Lane DN21 3LZ/PRE SITE NOTES.pdf"