Skip to content

Commit 27eda5d

Browse files
committed
Changed log level if error occur
1 parent 7743841 commit 27eda5d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/Gitonomy/Git/Repository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ public function run($command, $args = array())
383383

384384
if (!$process->isSuccessful()) {
385385
if ($this->logger) {
386-
$this->logger->debug(sprintf('last command ("%s") error output: "%s"', $command, $process->getErrorOutput()));
386+
$this->logger->error(sprintf('last command ("%s") error output: "%s"', $command, $process->getErrorOutput()));
387387
}
388388

389389
throw new RuntimeException($process);

tests/Gitonomy/Git/Tests/RepositoryTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,13 @@ public function testLoggerNOk()
125125
->method('info')
126126
;
127127
$logger
128-
->expects($this->exactly(3))
128+
->expects($this->exactly(2))
129129
->method('debug')
130130
;
131+
$logger
132+
->expects($this->once())
133+
->method('error')
134+
;
131135

132136
$repo = $this->createRepositoryInstance($this->getLibDirectory());
133137
$repo->setLogger($logger);

0 commit comments

Comments
 (0)