mirror of
https://github.com/Hestia-Homes/survey-extraction.git
synced 2026-06-30 13:10:56 +00:00
basic logging level changes
This commit is contained in:
parent
828065f0b8
commit
7537d0405b
3 changed files with 5 additions and 4 deletions
|
|
@ -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()
|
||||
|
||||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue