ttrss/vendor/open-telemetry/sdk/Logs/NoopLoggerProvider.php

34 lines
682 B
PHP
Raw Normal View History

2023-10-20 14:12:29 +00:00
<?php
declare(strict_types=1);
namespace OpenTelemetry\SDK\Logs;
use OpenTelemetry\API\Logs\LoggerInterface;
use OpenTelemetry\API\Logs\NoopLogger;
class NoopLoggerProvider implements LoggerProviderInterface
{
public static function getInstance(): self
{
static $instance;
return $instance ??= new self();
}
public function getLogger(string $name, ?string $version = null, ?string $schemaUrl = null, iterable $attributes = []): LoggerInterface
{
return NoopLogger::getInstance();
}
public function shutdown(): bool
{
return true;
}
public function forceFlush(): bool
{
return true;
}
}