Contributors mailing list archives
contributors@odoo-community.org
Browse archives
RE: suggestion for monitoring error 500
byHi Dominique,
I normally use the try … except like below:
try:
except Exception as e:
mail_smtp_server = self.env["ir.mail_server"].sudo().search([], limit=1)
email_vals = {"state": "outgoing" ,
"subject": str(self.env.cr.dbname) + " Error in demo 1 controller " ,
"body_html": """Error in demo 1 controller : """ + str(e.message) + " " + str(e.args) ,
"auto_delete": True,
"email_from": mail_smtp_server.smtp_user ,
"email_to": madeb@regious.co.zw ,
}
self.env["mail.mail"].create(email_vals)
Regards,
Bill Made
+263 733 419 060
From: Dominique k <notifications@odoo-community.org>
Sent: Monday, May 1, 2023 7:29 AM
To: Contributors <contributors@odoo-community.org>
Subject: suggestion for monitoring error 500
Hi,
We have a case where odoo is used as an e-commerce + portal system (with quite a lot of customisation).
Times to times, the end user (e-commerce customer) will receive an error 500.
It is a bit of a catchall... Would anybody have any suggestion, to monitor such error, and possibly get an email, or a warning as a system administrator? Is there a way to catch at odoo level, if there is such error and send an email ?
Or could we "monitor" the log file ? <-- any suggestion on possible tool ?
Thanks,
Dominique
_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
Reference
-
suggestion for monitoring error 500
bydominique.k-
RE: suggestion for monitoring error 500
byRegious (Private) Limited, Bill Made