命令行脚本运行时报错 UnexpectedValueException : The stream or file "/Data/PMS/storage/logs/laravel-2019-04-17.log" could not be opened: failed to open stream: Permission denied 查看文件权限 -rw-r--r-- 1 _www wheel 37K Apr 17 11:06 laravel-2019-04-17.log w
日志服务使用: $app=app(); $log=$app->make('log'); $log->info('post_index',['data'=>'this is post index']);//日志: 日志服务使用: \Log::info('post_index',['data'=>'this is post index']);//日志: 生成的日志: storage/logs/laravel.log文件中
背景介绍 公司需要实现X分钟内每隔Y秒轮训某个接口,Linux自带的crontab貌似只精确到分钟,虽然可以到精确到秒,但是并不满足需求. 选型 公司项目都是 基于 Laravel 框架,所以这个没得选.守护进程用的 supervisor,看看这个家伙能不能满足我们的需求 代码 namespace App\Console\Commands; use Illuminate\Console\Command; use Cache; use Carbon\Carbon; class TaskComman