<?php

declare(strict_types=1);

namespace Apexl\Io\Logger\Services;

use Apexl\Io\Logger\Dtos\StreamConfig;
use Apexl\Io\Logger\Services\HandlerCreator\HandlerCreatorFactory;

final readonly class LoggerFactory
{
    public function __construct(private HandlerCreatorFactory $handlerCreatorFactory) {}

    public function make(
        string $stream,
        StreamConfig $config,
    ): Logger {
        return new Logger($stream, $config, $this->handlerCreatorFactory);
    }
}