Modify/configure log4php LoggerLayoutHtml to insert <BR> tags

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Modify/configure log4php LoggerLayoutHtml to insert <BR> tags

Mike Rodent
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...