You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4php-user@logging.apache.org by Mike Rodent <mr...@yahoo.co.uk> on 2015/02/24 09:22:58 UTC

Modify/configure log4php LoggerLayoutHtml to insert
tags

Dear log4php experts,

This is a great package by the way.

I just want to log a string and for the newlines to be output in the HTML log as <br>. Trouble is, even if you use PHP's nl2br, it appears the logger reconverts back to the artefacts (or whatever the word is)... i.e. the logger converts "<br>" to "&lt;br&gt;" before outputting to the HTML file.
I don't know whether you can configure LoggerLayoutHtml to do this using Renderers maybe (clean, nice solution) or whether I will have to do some (dirty) tweaking of the code in the PHP files of log4php...