Skip to content

Commit b3a9286

Browse files
authored
add Logger.Enabled event name parameter (#1632)
extra parameter added in spec 1.45.0, which is optional and development stability
1 parent fec9a78 commit b3a9286

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Logs/LateBindingLogger.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function emit(LogRecord $logRecord): void
2222
($this->logger ??= ($this->factory)())->emit($logRecord);
2323
}
2424

25-
public function isEnabled(?ContextInterface $context = null, ?int $severityNumber = null): bool
25+
public function isEnabled(?ContextInterface $context = null, ?int $severityNumber = null, ?string $eventName = null): bool
2626
{
2727
return true;
2828
}

Logs/LoggerInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ public function emit(LogRecord $logRecord): void;
1414
* Determine if the logger is enabled. Instrumentation authors SHOULD call this method each time they
1515
* emit a LogRecord, to ensure they have the most up-to-date response.
1616
*/
17-
public function isEnabled(?ContextInterface $context = null, ?int $severityNumber = null): bool;
17+
public function isEnabled(?ContextInterface $context = null, ?int $severityNumber = null, ?string $eventName = null): bool;
1818
}

Logs/NoopLogger.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function log($level, $message, array $context = []): void
3232
{
3333
}
3434

35-
public function isEnabled(?ContextInterface $context = null, ?int $severityNumber = null): bool
35+
public function isEnabled(?ContextInterface $context = null, ?int $severityNumber = null, ?string $eventName = null): bool
3636
{
3737
return false;
3838
}

0 commit comments

Comments
 (0)