Answer the question
In order to leave comments, you need to log in
How to display the log on the screen and save it to a file?
I run the script in the console:
php script.php > log.log
It works, and as it works, it saves the logs to the log.log file Can
I add one more parameter so that everything that is saved to the log is displayed on the terminal screen?
Answer the question
In order to leave comments, you need to log in
It is possible so
php script.php | tee log.log
Or in a separate window run
tail -f log.log
multitail -f log.log
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question