Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[4.2] Enable easier usage of error_log in Log\Writer#4406

Merged
taylorotwell merged 1 commit into
laravel:4.2from
alprs:feature/error-log-handler
May 13, 2014
Merged

[4.2] Enable easier usage of error_log in Log\Writer#4406
taylorotwell merged 1 commit into
laravel:4.2from
alprs:feature/error-log-handler

Conversation

@anlutro
Copy link
Copy Markdown
Contributor

@anlutro anlutro commented May 13, 2014

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.

taylorotwell added a commit that referenced this pull request May 13, 2014
[4.2] Enable easier usage of error_log in Log\Writer
@taylorotwell taylorotwell merged commit 483422b into laravel:4.2 May 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants