The full_message is well formatted on the search page (see the first screenshot of my request. So it seems that the linebreaks are removed during mapping into the Email HTML body.
So i dont mean the original message, when the event fires a new message is generated in the “all messages” stream, and all the custom fields your extract from the message are stored as a subfield. My guess is the loss of formstting occurs at that step, but i wanted to confirm.
The issue of missing line breaks in your email notification likely stems from how the HTML email template interprets the full_message field. When you use ${message.fields.full_message}, the data is inserted as a single unformatted string, and the line breaks (e.g., \n) from the original log are ignored in the HTML rendering. HTML requires explicit tags for line breaks.
You can solve this by replacing the line breaks in the full_message field with HTML <br> tags before rendering the notification.
I was able to replicate the issue and the fix in a lab environment by using the following:
The ?replace("\n", "<br>") in the template replaces newline characters (\n) in the full_message field with <br> tags, which are recognized by HTML as line breaks.This ensures that the message retains its original line-by-line format when rendered in the email body.