Updated logger

I’ve added a zTemplate plugin to my Flexible Logger. This makes logging more flexible than ever as you can render logs in any format the template ranging from CSV to XHTML.

The variables for each log entry are date, level and message.

Here’s an example of using the zTemplate plugin to create a load of SQL insert statements. Why would you do that instead of inserting directly into the DB ? On a very busy site it can pay to write to a text file and import the logs into the DB when the server is less busy, e.g. during nightly maintenance.

And the template file:


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">