logging improvements (#2073)

* Scheduled tasks log to Debug, not Info

* Add LOG_LEVEL config to .env

* Update some other log levels and fix typos

* fix logger initializer

---------

Co-authored-by: Jakob Rubin <647846+Grygon@users.noreply.github.com>
This commit is contained in:
Hayden
2023-01-28 16:54:44 -09:00
committed by GitHub
parent 9ddb27b2e3
commit 530f7c9d6b
13 changed files with 28 additions and 24 deletions

View File

@@ -156,7 +156,6 @@ class RecipeDataService(BaseService):
self.logger.error(f"Content-Type: {content_type} is not an image")
raise NotAnImageError(f"Content-Type {content_type} is not an image")
self.logger.info(f"File Name Suffix {file_path.suffix}")
self.logger.debug(f"File Name Suffix {file_path.suffix}")
self.write_image(r.read(), file_path.suffix)
file_path.unlink(missing_ok=True)

View File

@@ -63,7 +63,7 @@ class RecipeService(BaseService):
try:
copytree(current_dir, recipe.directory, dirs_exist_ok=True)
self.logger.info(f"Renaming Recipe Directory: {original_slug} -> {recipe.slug}")
self.logger.debug(f"Renaming Recipe Directory: {original_slug} -> {recipe.slug}")
except FileNotFoundError:
self.logger.error(f"Recipe Directory not Found: {original_slug}")