我想调试我的应用程序,我有几个使用Log
正面的日志语句。现在,我使用artisan serve
运行应用程序,它会将日志消息写入日志文件并获取我运行的实时日志消息。打印日志到终端运行工匠服务
tail -f laravel.log
有什么办法,我可以直接打印日志消息到运行php artisan serve
同一个控制台/终端?
我想调试我的应用程序,我有几个使用Log
正面的日志语句。现在,我使用artisan serve
运行应用程序,它会将日志消息写入日志文件并获取我运行的实时日志消息。打印日志到终端运行工匠服务
tail -f laravel.log
有什么办法,我可以直接打印日志消息到运行php artisan serve
同一个控制台/终端?
tail -f storage/logs/laravel.log & php artisan serve
您可以使用以下操作执行此操作。这个工程的任何地方..
$output = new Symfony\Component\Console\Output\ConsoleOutput();
$output->writeln("<info>Error message</info>");
这将打印运行php artisan serve
标准在终端/主机消息“error_log中” PHP函数你想要做什么。