<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Sat, 25 May 2013 03:20:30 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Bob Majdak: Apache access logging in JSON format]]></title>
      <guid>http://www.phpdeveloper.org/news/18277</guid>
      <link>http://www.phpdeveloper.org/news/18277</link>
      <description><![CDATA[<p>
<i>Bob Majdak</i> has a quick new post to his site showing you how to <a href="http://catch404.net/2012/07/apache-access-logging-in-json-format/">log messages to Apache</a> using a JSON format instead of the usual single-line information.
</p>
<blockquote>
So this past week I have been doing a lot of logging, parsing, and graphing. I was sitting there wondering what I could do to make the Apache access logs easier to work with. Then it hit me, a brilliant stroke of win: why not format it in JSON? Then in my log parser I could just json_decode it! As far as I know there are no tricks to make Apache do this for you, so really all we have to do is define a custom log format that happens to look like JSON.
</blockquote>
<p>
He includes the "LogFormat" line you'll need to add to your Apache configuration to make it log the JSON and a bit of PHP to help you pull in the file's contents and <a href="http://php.net/json_decode">parse</a> each line.
</p>]]></description>
      <pubDate>Thu, 26 Jul 2012 11:42:02 -0500</pubDate>
    </item>
  </channel>
</rss>
