Skip to content

Commit

Permalink
Fix error when logging non-strings (#76)
Browse files Browse the repository at this point in the history
Also fix test. It failed because Windows default precision isn't enough for such condition.
  • Loading branch information
samdark committed Dec 4, 2020
1 parent 2cd1748 commit 1d7a743
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Collector/LogCollector.php
Expand Up @@ -15,7 +15,7 @@ public function getCollected(): array
return $this->messages;
}

public function collect(string $level, string $message, array $context): void
public function collect(string $level, $message, array $context): void
{
if (!$this->isActive()) {
return;
Expand Down
4 changes: 2 additions & 2 deletions src/Collector/LogCollectorInterface.php
Expand Up @@ -13,8 +13,8 @@ interface LogCollectorInterface extends CollectorInterface
* Collect data payload
*
* @param string $level
* @param string $message
* @param mixed $message
* @param array $context
*/
public function collect(string $level, string $message, array $context): void;
public function collect(string $level, $message, array $context): void;
}
2 changes: 1 addition & 1 deletion tests/Collector/WebAppInfoCollectorTest.php
Expand Up @@ -36,6 +36,6 @@ protected function checkCollectedData(CollectorInterface $collector): void
parent::checkCollectedData($collector);
$data = $collector->getCollected();

$this->assertGreaterThan(0.123, $data['request_processing_time']);
$this->assertGreaterThan(0.122, $data['request_processing_time']);
}
}

0 comments on commit 1d7a743

Please sign in to comment.