title: Laravel Database Log - what is the best practice
body: <p>I have a pretty common problem I think, but I can't find any "best practice" answer to it.</p>
  
  <p>I developped a lot of small web apps based on a home made framework for my clients. Those apps are used only in a very specific business related context, they are used for something like a mounth in a year by an average of ten users.</p>
  
  <p>Each app has a very diffrent purpose and "technology" behind it (sometimes it's Zend modules, TCPDF, etc...). Of course, once in a while users find some minor bugs (not handled exceptions, not set arrays ...).</p>
  
  <p>The problem is, that users won't communicate about it for days or weeks, so when I have to debug, sometimes I don't have all the information I need (like, how to reproduce it, which route it was, etc ...).</p>
  
  <p>For my home made framework (very Laravel-like) I made some functions that handles those errors (using set_error_handler, register_shutdown_function, ...). Basicly those function will create some log entry in client's MySQL database. </p>
  
  <p>I use those functions for two purposes :</p>
  
  <ol>
  <li>Log user actions AND php errors + context (routes, controllers, some data flow, php predefined variables, ...)</li>
  <li>Warn me when something goes wrong (by mail, SMS, etc ...)</li>
  </ol>
  
  <p>The only way I can analyse all these logs <strong>efficiently</strong> is when they are in a database (i have a JQuery table rendring them optimized for faster reading and tracking). Otherwise, i would just use text files, but I can't analyse them so fast (too much information).</p>
  
  <p><strong>Question</strong></p>
  
  <p>I just started a project with Laravel (which I'll be using for all my projects now), after some documentation reading I've found that Laravel uses Monolog for logs. BUT, Monolog don't have a PDO handler, some people may say that using MySQL for logs is a very bad idea (<a href="https://stackoverflow.com/questions/15593010/can-laravel-4-log-to-a-mysql-database">Can Laravel 4 log to a MySQL database?</a>) and I totally agree with them. But it is the only way i've found to do efficient bug correction when working with a lot of small projects with a limited time to dedicate to it.</p>
  
  <p>Note : My clients only have MySQL, I don't have the time to use unit testing (small company, no money for that).</p>
  
  <p><strong>Is there a better solution for my problem  (log users activities AND php errors in a structured way, mail/SMS notification when errors are catched) using some Laravel magic I don't know about yet ?</strong></p>