[Feedback] Modernize Logger Structure

Review Request #272 — Created Feb. 26, 2014 and submitted — Latest diff uploaded

pprkut
Lunr
pprkut:fao
271
lunr
Create an AbstractLogger class that implements the Log Message composition and let all specific Loggers extend from it.
Allows for a slightly cleaner implementation then always extending PHPLogger.
Switch the FileLogger to use the FAO instead of error_log(). Note that this now no longer prints a stack trace, so if you want than use a ChainLogger and combine it with the PHPLogger.
Unit tests
src/Lunr/Feedback/AbstractLogger.php
src/Lunr/Feedback/FileLogger.php
src/Lunr/Feedback/PHPLogger.php
src/Lunr/Feedback/Tests/AbstractLoggerDateTimeTest.php
src/Lunr/Feedback/Tests/AbstractLoggerNoDateTimeTest.php
src/Lunr/Feedback/Tests/AbstractLoggerTest.php
src/Lunr/Feedback/Tests/FileLoggerTest.php
src/Lunr/Feedback/Tests/PHPLoggerTest.php
tests/phpunit.xml
Loading...