<?php

namespace App\Core;

final class Log
{
    public static function error(string $message, array $context = []): void
    {
        $line = sprintf("[%s] %s %s\n", date('c'), $message, json_encode($context));
        file_put_contents(__DIR__ . '/../../storage/logs/app.log', $line, FILE_APPEND);
    }
}
