Skip to content

Commit

Permalink
add enabled to late binding logger and tracer
Browse files Browse the repository at this point in the history
  • Loading branch information
brettmc committed Aug 6, 2024
1 parent 68b1b43 commit 8a13548
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/API/Logs/LateBindingLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,9 @@ public function emit(LogRecord $logRecord): void
{
($this->logger ??= ($this->factory)())->emit($logRecord);
}

public function enabled(): bool
{
return true;
}
}
5 changes: 5 additions & 0 deletions src/API/Trace/LateBindingTracer.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,9 @@ public function spanBuilder(string $spanName): SpanBuilderInterface
{
return ($this->tracer ??= ($this->factory)())->spanBuilder($spanName);
}

public function enabled(): bool
{
return true;
}
}

0 comments on commit 8a13548

Please sign in to comment.