laravel/framework — pull request #4406 by anlutro (2014-05-13 11:13:55+00:00)
Title: [4.2] Enable easier usage of error_log in Log\Writer

In many setups you want to use the centralized `error_log` function in PHP to log errors and the like, so I added a quick helper method to do this.

The `$messageType` parameter corresponds to $message_type as found in the `error_log` documentation on php.net. The default behaviour is to use the default OS log, but there is an option to use the SAPI log which will, for example, let Apache2 decide where errors should be logged. This may be a more sensible default and a more recommended setup, but I figured sticking with default PHP and Monolog behaviour was best.

Also refactored the `new LineFormatter` into its own method as it was being re-used in several methods.