@frappe.whitelist()
def clear_error_logs():
 frappe.only_for(u'System Manager')
 frappe.db.sql(u'delete from `tabError Log`')

@ frappe . whitelist ( ) def clear_error_logs ( ) : frappe . only_for ( u'System Manager' ) frappe . db . sql ( u'delete from `tabError Log`' )
flush all error logs .