View file vendor/deployer/deployer/src/Logger/Handler/FileHandler.php

File size: 576B
<?php declare(strict_types=1);

/* (c) Anton Medvedev <[email protected]>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Deployer\Logger\Handler;

class FileHandler implements HandlerInterface
{
    /**
     * @var string
     */
    private $filePath;

    public function __construct(string $filePath)
    {
        $this->filePath = $filePath;
    }

    public function log(string $message): void
    {
        file_put_contents($this->filePath, $message, FILE_APPEND);
    }
}