$monolog = Log::getMonolog();
$monolog->popHandler();
$logDir = 'logs/pay/'.date('Ymd');
$logPath = 'logs/pay/'.date('Ymd').'/info.log';
$storagePath = storage_path($logPath);
if(!is_dir(storage_path($logDir))){
mkdir(storage_path($logDir));
}
if(!file_exists($storagePath)){
fopen($storagePath,'w');
}
Log::useFiles($storagePath);
laravel 5.6以下版本使用
本作品採用《CC 協議》,轉載必須註明作者和本文連結