{% set error_lines = (doc.error or "").split('\n') %} {% set first_lines = 10 %} {% set last_lines = 15 %} {% set max_lines = first_lines + last_lines %} {% set total_lines = error_lines | length %} {% set needs_truncation = total_lines > max_lines %}
Error Log |
| Site | {{ frappe.utils.get_url() }} |
| Error ID | {{ frappe.utils.get_link_to_form("Error Log", doc.name, doc.name) }} |
| Title | {{ doc.method or "N/A" }} |
| Logged At | {{ frappe.utils.format_datetime(doc.creation) }} |
| Reference | {{ frappe.utils.get_link_to_form(doc.reference_doctype, doc.reference_name) }} |
{% if needs_truncation %}{{ error_lines[:first_lines] | join('\n') }}
... {{ total_lines - max_lines }} lines omitted ...
{{ error_lines[-last_lines:] | join('\n') }}{% else %}{{ error_lines | join('\n') }}{% endif %}
This is an automated notification from {{ frappe.utils.get_host_name() }}.