Skip to content

Commit

Permalink
Make sure we get the general request context in every log message
Browse files Browse the repository at this point in the history
  • Loading branch information
bakert committed Nov 11, 2024
1 parent c51886f commit 4eb4a55
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions gatherling/Logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,63 +83,63 @@ private function normalizeLogLevel(mixed $level): Level
*/
public function emergency(string|Stringable $message, array $context = []): void
{
$this->logger->emergency($message, $context);
$this->log(Level::Emergency, $message, $context);
}

/**
* @param array<int|string, mixed> $context
*/
public function alert(string|Stringable $message, array $context = []): void
{
$this->logger->alert($message, $context);
$this->log(Level::Alert, $message, $context);
}

/**
* @param array<int|string, mixed> $context
*/
public function critical(string|Stringable $message, array $context = []): void
{
$this->logger->critical($message, $context);
$this->log(Level::Critical, $message, $context);
}

/**
* @param array<int|string, mixed> $context
*/
public function error(string|Stringable $message, array $context = []): void
{
$this->logger->error($message, $context);
$this->log(Level::Error, $message, $context);
}

/**
* @param array<int|string, mixed> $context
*/
public function warning(string|Stringable $message, array $context = []): void
{
$this->logger->warning($message, $context);
$this->log(Level::Warning, $message, $context);
}

/**
* @param array<int|string, mixed> $context
*/
public function notice(string|Stringable $message, array $context = []): void
{
$this->logger->notice($message, $context);
$this->log(Level::Notice, $message, $context);
}

/**
* @param array<int|string, mixed> $context
*/
public function info(string|Stringable $message, array $context = []): void
{
$this->logger->info($message, $context);
$this->log(Level::Info, $message, $context);
}

/**
* @param array<int|string, mixed> $context
*/
public function debug(string|Stringable $message, array $context = []): void
{
$this->logger->debug($message, $context);
$this->log(Level::Debug, $message, $context);
}

public function clear(): void
Expand Down

0 comments on commit 4eb4a55

Please sign in to comment.