Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable4.0] fix(psrlog): Make the logger compatible with the upcoming bump to psr… #10232

Merged
merged 1 commit into from
Oct 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions lib/Support/ConsoleLoggerDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,49 +25,49 @@ public function __construct(LoggerInterface $inner,
$this->consoleOutput = $consoleOutput;
}

public function emergency($message, array $context = []) {
public function emergency($message, array $context = []): void {
$this->consoleOutput->writeln("<error>[emergency] $message</error>");

$this->inner->emergency($message, $context);
}

public function alert($message, array $context = []) {
public function alert($message, array $context = []): void {
$this->consoleOutput->writeln("<error>[alert] $message</error>");

$this->inner->alert($message, $context);
}

public function critical($message, array $context = []) {
public function critical($message, array $context = []): void {
$this->consoleOutput->writeln("<error>[critical] $message</error>");

$this->inner->critical($message, $context);
}

public function error($message, array $context = []) {
public function error($message, array $context = []): void {
$this->consoleOutput->writeln("<error>[error] $message</error>");

$this->inner->error($message, $context);
}

public function warning($message, array $context = []) {
public function warning($message, array $context = []): void {
$this->consoleOutput->writeln("[warning] $message");

$this->inner->warning($message, $context);
}

public function notice($message, array $context = []) {
public function notice($message, array $context = []): void {
$this->consoleOutput->writeln("<info>[notice] $message</info>");

$this->inner->notice($message, $context);
}

public function info($message, array $context = []) {
public function info($message, array $context = []): void {
$this->consoleOutput->writeln("<info>[info] $message</info>");

$this->inner->info($message, $context);
}

public function debug($message, array $context = []) {
public function debug($message, array $context = []): void {
if ($this->consoleOutput->getVerbosity() < OutputInterface::VERBOSITY_DEBUG) {
return;
}
Expand All @@ -77,7 +77,7 @@ public function debug($message, array $context = []) {
$this->inner->debug($message, $context);
}

public function log($level, $message, array $context = []) {
public function log($level, $message, array $context = []): void {
$this->consoleOutput->writeln("<info>[log] $message</info>");

$this->inner->log($level, $message, $context);
Expand Down
Loading