Skip to content

Commit

Permalink
Logger: Fix typehints.
Browse files Browse the repository at this point in the history
  • Loading branch information
janbarasek authored Apr 10, 2022
1 parent 3d54ae3 commit e9619fb
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/SentryLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,14 @@ public static function register(): void
}


/**
* @param mixed $value
* @param string $level
*/
public function log($value, $level = self::INFO): void
public function log(mixed $value, mixed $level = self::INFO): void
{
$this->fallback->log($value, $level);
if (is_string($level) === false) {
return;
}
try {
$this->logToSentry($value, (string) $level);
$this->logToSentry($value, $level);
} catch (\Throwable $e) {
$this->fallback->log($e, ILogger::CRITICAL);
}
Expand Down

0 comments on commit e9619fb

Please # to comment.