summaryrefslogtreecommitdiff
path: root/vendor/open-telemetry/api/Logs/NoopLoggerProvider.php
blob: 8b00b66379f618a634bcdb6ba05be33820a52424 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php

declare(strict_types=1);

namespace OpenTelemetry\API\Logs;

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();
    }
}