title: PHP what to use to log information in a file based on events in an application
body: <p>I've created an application that makes several calls to a mysql database and executes queries. What I want to do is create/use a class that would allow me to log information related to what the user does. I would prefer that it includes the date, time, and the ability to write a specific message to the file.</p>
  
  <p>What should I use that has this sort of functionality?</p>
  
  <p>I heard <code>KLogger</code> (found here: <a href="http://codefury.net/projects/klogger/" rel="nofollow">http://codefury.net/projects/klogger/</a>) was a good class to use for this, but what about the <em>PHP: syslog</em>? (found here: <a href="http://php.net/manual/en/function.syslog.php" rel="nofollow">http://php.net/manual/en/function.syslog.php</a>) </p>
  
  <p>Or would it be more suitable to write my own logging class? (may do that just to get some good experience) Or maybe there are other ones that I've missed and haven't mentioned that would be more suitable?</p>
  
  <p>An example of what I need would be.. The user adds an entry to the database. I want to write to a file called <em>log.txt</em> in some specified directory that would say:</p>
  
  <pre><code>"2012/23/11 9:31AM User added entry to this table"
  </code></pre>
  
  <p>Any insight is greatly appreciated as always. Thank you in advance!</p>