I'm currently looking into how to log events to HTML, XML and RSS files.
There is one main issue here:
Header and footer of the layout is added to each log message which leads
to malformed output.
In example using the html layout together with the file appender leads
to a html-file that includes complete chunks of an html-document for
each message which is appended after each other. The output is both a
malformed document and the output could probably look better ;)
So how do we deal with this.
1. I think we can agree that log4php should always produce valid
documents, if not it's worth next to nothing.
2. If so we can't use the file appender together with the "complex
layouts" (layouts that need a fixed header and footer and stuff logging
event messages somewhere in that file) and need to create a separate
LoggerAppenderHtml and LoggerAppenderXml to be able to add the logic
needed for creating and updating a valid output.
So my final question would be:
Does it make sense to create a LoggerAppenderHtml in this case and
modify the DOM upon appending messages? Any other suggestions on how to
resolve this?
Knut