summaryrefslogtreecommitdiff
path: root/vendor/open-telemetry/api/Behavior/Internal/LogWriter/Psr3LogWriter.php
blob: 5b2d19c15eb9e00d3bbb79ebce571a2d194c8bde (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php

declare(strict_types=1);

namespace OpenTelemetry\API\Behavior\Internal\LogWriter;

use Psr\Log\LoggerInterface;

class Psr3LogWriter implements LogWriterInterface
{
    private LoggerInterface $logger;

    public function __construct(LoggerInterface $logger)
    {
        $this->logger = $logger;
    }

    public function write($level, string $message, array $context): void
    {
        $this->logger->log($level, $message, $context);
    }
}