Skip to content

Commit

Permalink
remove: rm log error on default error handler
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Aug 12, 2019
1 parent 11a6011 commit 5a27704
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions src/error/src/DefaultExceptionHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@

namespace Swoft\Error;

use ReflectionException;
use Swoft\Bean\Exception\ContainerException;
use Swoft\Error\Contract\DefaultErrorHandlerInterface;
use Swoft\Log\Helper\CLog;
use Swoft\Log\Helper\Log;
use Throwable;
use function get_class;

Expand All @@ -21,20 +18,13 @@ class DefaultExceptionHandler implements DefaultErrorHandlerInterface
* @param Throwable $e
*
* @return void
* @throws ReflectionException
* @throws ContainerException
*/
public function handle(Throwable $e): void
{
Log::error($e->getMessage());
CLog::error(
"(DEFAULT HANDLER)Exception(%s): %s\nAt File %s line %d\nTrace:\n%s\n",
get_class($e),
$e->getMessage(),
$e->getFile(),
$e->getLine(),
$e->getTraceAsString()
);
// Log::error($e->getMessage());

CLog::error("(DEFAULT HANDLER)Exception(%s): %s\nAt File %s line %d\nTrace:\n%s\n", get_class($e),
$e->getMessage(), $e->getFile(), $e->getLine(), $e->getTraceAsString());
}

/**
Expand Down

0 comments on commit 5a27704

Please sign in to comment.