diff --git a/python-naive/{{ cookiecutter.__project_slug }}/{{ cookiecutter.__project_slug }}.py b/python-naive/{{ cookiecutter.__project_slug }}/{{ cookiecutter.__project_slug }}.py index 740741c..9dcdbca 100644 --- a/python-naive/{{ cookiecutter.__project_slug }}/{{ cookiecutter.__project_slug }}.py +++ b/python-naive/{{ cookiecutter.__project_slug }}/{{ cookiecutter.__project_slug }}.py @@ -212,8 +212,8 @@ def validate_config_sections( sys.exit(7) if not set(CONST.CFG_MANDATORY).issubset(config_obj.options(this_section, no_defaults=True)): - {% if cookiecutter.use_rich_logging == "yes" -%}log.debug{%- else -%}print{%- endif %}(f"Config section '[{this_section}]' does not have all mandatory options " - {% if cookiecutter.use_rich_logging == "yes" %} {% endif %}f"{CONST.CFG_MANDATORY} set, skipping section ...") + {% if cookiecutter.use_rich_logging == "yes" -%}log.warning{%- else -%}print{%- endif %}(f"Config section '[{this_section}]' does not have all mandatory options " + {% if cookiecutter.use_rich_logging == "yes" %} {% endif %}f"{CONST.CFG_MANDATORY} set, skipping section ...") config_obj.remove_section(this_section) else: for key in config_obj.options(this_section, no_defaults=True): @@ -254,13 +254,13 @@ if __name__ == "__main__": if config_has_valid_section(config): validate_config_sections(config) else: - {% if cookiecutter.use_rich_logging == "yes" -%}log.debug{%- else -%}print{%- endif %}(f"No valid config section found. A valid config section has at least the mandatory options " + {% if cookiecutter.use_rich_logging == "yes" -%}log.error{%- else -%}print{%- endif %}(f"No valid config section found. A valid config section has at least the mandatory options " {% if cookiecutter.use_rich_logging == "yes" %} {% endif %}f"{CONST.CFG_MANDATORY} set. Exiting 2 ...") sys.exit(2) {% if cookiecutter.use_rich_logging == "yes" -%}log.debug{%- else -%}print{%- endif %}(f"Iterating over config sections ...") for section in config.sections(): - {% if cookiecutter.use_rich_logging == "yes" -%}log.debug{%- else -%}print{%- endif %}(f"Processing section '[{section}]' ...") + {% if cookiecutter.use_rich_logging == "yes" -%}log.info{%- else -%}print{%- endif %}(f"Processing section '[{section}]' ...") # ... {%- else -%} pass