I have a script that I need to save its output to a log file. Till now I had this implementation:
ob_start();
:
:
$content = ob_get_clean();
Storage::disk('local')->put($logfilePath, $content);
The problem is that the script execution time is relatively long, and I need to be able to see the output on screen on the same time.
I was looking for a way to do it, but could not find any elegant solution for it.
Any idea?
Update:
I am using Laravel framework, the process is a Command instance.