fix(minor): update frappe.error_log to new API (#30864)

* fix(minor): update frappe.error_log to new API

* refactor: changes for updated log_error api

Co-authored-by: Ankush Menat <ankush@frappe.io>
This commit is contained in:
Rushabh Mehta
2022-05-02 15:04:26 +05:30
committed by GitHub
parent dcda55641b
commit 548afba8bb
33 changed files with 59 additions and 97 deletions

View File

@@ -72,7 +72,7 @@ class LinkedInSettings(Document):
if media_id:
return self.post_text(text, title, media_id=media_id)
else:
frappe.log_error("Failed to upload media.", "LinkedIn Upload Error")
self.log_error("LinkedIn: Failed to upload media")
def upload_image(self, media):
media = get_file_path(media)

View File

@@ -70,8 +70,7 @@ class SocialMediaPost(Document):
except Exception:
self.db_set("post_status", "Error")
title = _("Error while POSTING {0}").format(self.name)
frappe.log_error(message=frappe.get_traceback(), title=title)
self.log_error("Social posting failed")
def process_scheduled_social_media_posts():