for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* AppserverIo\Logger\Handlers\ErrorLogHandler
*
* NOTICE OF LICENSE
* This source file is subject to the Open Software License (OSL 3.0)
* that is available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* PHP version 5
* @author Tim Wagner <[email protected]>
* @copyright 2015 TechDivision GmbH <[email protected]>
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* @link http://github.com/appserver-io/logger
* @link http://www.appserver.io
*/
namespace AppserverIo\Logger\Handlers;
use AppserverIo\Logger\LogMessageInterface;
* Logger implementation that uses the PHP error_log() function.
class ErrorLogHandler extends DummyHandler
{
* Handles the log message.
* @param \AppserverIo\Logger\LogMessageInterface $logMessage The message to be handled
* @return void
public function handle(LogMessageInterface $logMessage)
if ($this->shouldLog($logMessage->getLevel())) {
// check the log level
error_log($this->getFormatter()->format($logMessage));
}