<?php

namespace App\Services;

use Exception;
use Illuminate\Support\Facades\Log;

class LogService
{
    public static function error(Exception $e): void
    {
        $errorText = "\n---------------错误信息---------------\n";
        $errorText .= "File：{$e->getFile()}\n";
        $errorText .= "Link：{$e->getLine()}\n";
        $errorText .= $e->getMessage();
        $errorText .= "\n";
        Log::error($errorText);
    }
}