[Console] Log exit codes as debug messages instead of errors
This commit is contained in:
parent
267b016415
commit
cadbed301f
@ -59,10 +59,10 @@ class ErrorListener implements EventSubscriberInterface
|
||||
}
|
||||
|
||||
if (!$inputString = $this->getInputString($event)) {
|
||||
return $this->logger->error('The console exited with code "{code}"', array('code' => $exitCode));
|
||||
return $this->logger->debug('The console exited with code "{code}"', array('code' => $exitCode));
|
||||
}
|
||||
|
||||
$this->logger->error('Command "{command}" exited with code "{code}"', array('command' => $inputString, 'code' => $exitCode));
|
||||
$this->logger->debug('Command "{command}" exited with code "{code}"', array('command' => $inputString, 'code' => $exitCode));
|
||||
}
|
||||
|
||||
public static function getSubscribedEvents()
|
||||
|
@ -61,7 +61,7 @@ class ErrorListenerTest extends TestCase
|
||||
$logger = $this->getLogger();
|
||||
$logger
|
||||
->expects($this->once())
|
||||
->method('error')
|
||||
->method('debug')
|
||||
->with('Command "{command}" exited with code "{code}"', array('command' => 'test:run', 'code' => 255))
|
||||
;
|
||||
|
||||
@ -74,7 +74,7 @@ class ErrorListenerTest extends TestCase
|
||||
$logger = $this->getLogger();
|
||||
$logger
|
||||
->expects($this->never())
|
||||
->method('error')
|
||||
->method('debug')
|
||||
;
|
||||
|
||||
$listener = new ErrorListener($logger);
|
||||
@ -97,7 +97,7 @@ class ErrorListenerTest extends TestCase
|
||||
$logger = $this->getLogger();
|
||||
$logger
|
||||
->expects($this->exactly(3))
|
||||
->method('error')
|
||||
->method('debug')
|
||||
->with('Command "{command}" exited with code "{code}"', array('command' => 'test:run --foo=bar', 'code' => 255))
|
||||
;
|
||||
|
||||
@ -112,7 +112,7 @@ class ErrorListenerTest extends TestCase
|
||||
$logger = $this->getLogger();
|
||||
$logger
|
||||
->expects($this->once())
|
||||
->method('error')
|
||||
->method('debug')
|
||||
->with('Command "{command}" exited with code "{code}"', array('command' => 'test:run', 'code' => 255))
|
||||
;
|
||||
|
||||
|
Reference in New Issue
Block a user