Skip to content

Commit

Permalink
Revert types in logger signature.
Browse files Browse the repository at this point in the history
  • Loading branch information
ksucherek committed Dec 5, 2024
1 parent cab0f1c commit 286b6eb
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/Ouzo/Core/Logger/LoggerAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,49 +33,49 @@ public function __construct(
$this->minimalLevels = Arrays::getValue($loggerConfiguration, 'minimal_levels', []);
}

public function emergency($message, array $context = []): void
public function emergency(string $message, array $context = []): void
{
$this->log(LogLevel::EMERGENCY, $message, $context);
}

public function alert($message, array $context = []): void
public function alert(string $message, array $context = []): void
{
$this->log(LogLevel::ALERT, $message, $context);
}

public function critical($message, array $context = []): void
public function critical(string $message, array $context = []): void
{
$this->log(LogLevel::CRITICAL, $message, $context);
}

public function error($message, array $context = []): void
public function error(string $message, array $context = []): void
{
$this->log(LogLevel::ERROR, $message, $context);
}

public function warning($message, array $context = []): void
public function warning(string $message, array $context = []): void
{
$this->log(LogLevel::WARNING, $message, $context);
}

public function notice($message, array $context = []): void
public function notice(string $message, array $context = []): void
{
$this->log(LogLevel::NOTICE, $message, $context);
}

public function info($message, array $context = []): void
public function info(string $message, array $context = []): void
{
$this->log(LogLevel::INFO, $message, $context);
}

public function debug($message, array $context = []): void
public function debug(string $message, array $context = []): void
{
if ($this->isDebug()) {
$this->log(LogLevel::DEBUG, $message, $context);
}
}

public function log($level, $message, array $context = []): void
public function log(string $level, $message, array $context = []): void
{
$ouzoLevel = LogLevelTranslator::toSyslogLevel($level);
$minimalLevel = $this->minimalLevels ? Arrays::getValue($this->minimalLevels, $this->name, LOG_DEBUG) : LOG_DEBUG;
Expand Down

0 comments on commit 286b6eb

Please sign in to comment.