Skip to content

Commit

Permalink
Revert Logger changes
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhuesken committed Jan 28, 2025
1 parent 6279c46 commit 8ea4158
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/Log/WcPsrLoggerAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ class WcPsrLoggerAdapter extends AbstractLogger
*/
private $loggingLevel;

private string $loggingThreadId = '';

/**
* WcPsrLoggerAdapter constructor.
*
Expand All @@ -63,7 +61,6 @@ public function __construct(
\assert(in_array($loggingLevel, $this->psrWcLoggingLevels, true));
$this->loggingLevel = $loggingLevel;
$this->loggerSource = $loggerSource;
$this->loggingThreadId = uniqid();
}

/**
Expand All @@ -81,14 +78,6 @@ public function log($level, $message, array $context = [])
if (isset($this->psrWcLoggingLevels[$level])) {
$wcLevel = $this->psrWcLoggingLevels[$level];
}

if ($context === [true]) {
$context = [];
}
$context['threadId'] = $this->loggingThreadId;
$context['request_vars'] = $_REQUEST;
$context['request_uri'] = $_SERVER['REQUEST_URI'];

if (\WC_Log_Levels::get_level_severity($wcLevel) < \WC_Log_Levels::get_level_severity($this->loggingLevel)) {
$message = sprintf("Unknown log level %s", $wcLevel);
throw new InvalidArgumentException(esc_html($message));
Expand Down

0 comments on commit 8ea4158

Please sign in to comment.