This commit is contained in:
2026-07-30 13:50:51 +08:00
parent b6e3ce97b4
commit 61b88bf45d
10 changed files with 1257 additions and 35 deletions

View File

@@ -21,31 +21,31 @@ class Logger
private array $context = [];
private bool $isError = false;
public function setMessage(string $message): self
public function setMessage(string $message): static
{
$this->message = $message;
return $this;
}
public function setData(array $data): self
public function setData(array $data): static
{
$this->data = $data;
return $this;
}
public function setThrowable(Throwable $throwable): self
public function setThrowable(Throwable $throwable): static
{
$this->throwable = $throwable;
return $this;
}
public function setTraceId(string $traceId): self
public function setTraceId(string $traceId): static
{
$this->traceId = $traceId;
return $this;
}
public function setContext(array $context): self
public function setContext(array $context): static
{
$this->context = $context;
return $this;
@@ -56,7 +56,7 @@ class Logger
return $this->isError;
}
public function setErrorStatus(bool $isError): self
public function setErrorStatus(bool $isError): static
{
$this->isError = $isError;
return $this;