title: Log PHP exceptions in Laravel Log
body: <p>I'm starting to create a custom log feature for my application in Laravel 4 everything works fine for custom messages but when i try to log the exception messages within <code>try..catch(Exception $e)</code> doesn't write this exception on the log file.</p>
  
  <pre><code>&lt;?php namespace Api\ApplicationEvents;
  
  use Monolog\Logger;
  use Monolog\Handler\StreamHandler;
  
  class LogWritter {
  
      public static function write( $logMessage, $logLevel)
      {
          $date = date('d_m_y');
  
          $logFile = public_path() . '\logs\log_' . $date . '.log';
  
          if ( !file_exists($logFile)) {
              $fp = fopen($logFile, 'w');
              fwrite($fp, '');
              fclose($fp);
          }
  
          $log = new Logger('Menu App Log: ');
  
          switch ($logLevel) {
              case 'Info':
                  $log-&gt;pushHandler( new StreamHandler($logFile, Logger::INFO) ); 
                  break;
  
              case 'Warn':
                  $log-&gt;pushHandler( new StreamHandler($logFile, Logger::WARNING) ); 
                  break;
  
              case 'Error':
                  $log-&gt;pushHandler( new StreamHandler($logFile, Logger::ERROR) ); 
                  break;
          }
  
          $log-&gt;addInfo($logMessage);
      }
  }
  ?&gt;
  </code></pre>
  
  <p>The call of the function is like that:</p>
  
  <pre><code>try { 
  // code goes here 
  } catch (Exception $e) {
     $exception = $e-&gt;getMessage();
     Api\ApplicationEvents\LogWritter::write( $exception, 'Error');
  }
  </code></pre>
  
  <p>But for now can't write the exception message in the log file</p>
  
  <p>Can somebody help me to get this going right, what am i doing wrong?</p>