diff --git a/src/ytdl_sub/utils/yaml.py b/src/ytdl_sub/utils/yaml.py index 589a5975..92e75401 100644 --- a/src/ytdl_sub/utils/yaml.py +++ b/src/ytdl_sub/utils/yaml.py @@ -8,6 +8,9 @@ from yaml import YAMLError from ytdl_sub.utils.exceptions import FileNotFoundException from ytdl_sub.utils.exceptions import InvalidYamlException +from ytdl_sub.utils.logger import Logger + +logger = Logger.get(name="yaml") def load_yaml(file_path: str | Path) -> Dict: @@ -35,6 +38,7 @@ def load_yaml(file_path: str | Path) -> Dict: with open(file_path, "r", encoding="utf-8") as file: return yaml.safe_load(file) except YAMLError as yaml_exception: + logger.debug(yaml_exception) raise InvalidYamlException( f"'{file_path}' has invalid YAML, copy-paste it into a YAML checker to find the issue." ) from yaml_exception