Improve logging. Move print() statements to appropiate log().

Add COMFYUI and WEBHOOK logging and associated environment variable
control. Add WEBHOOK payload & request debug logs.
This commit is contained in:
Self Denial
2024-03-31 13:17:29 -06:00
parent 1d7ca44017
commit 144c9059a3
6 changed files with 31 additions and 16 deletions

View File

@@ -325,7 +325,7 @@ def save_url_image(url):
return image_id
except Exception as e:
print(f"Error saving image: {e}")
log.exception(f"Error saving image: {e}")
return None
@@ -397,7 +397,7 @@ def generate_image(
user.id,
app.state.COMFYUI_BASE_URL,
)
print(res)
log.debug(f"res: {res}")
images = []
@@ -409,7 +409,7 @@ def generate_image(
with open(file_body_path, "w") as f:
json.dump(data.model_dump(exclude_none=True), f)
print(images)
log.debug(f"images: {images}")
return images
else:
if form_data.model: