PHP built-in server redirect logs

231 Views Asked by At

I need to redirect my php built in server log file into a file.

i try :

php -S adress:port -t . > logs.txt

the problem is it's just putting inside the launch text.

and logs.txt 2>&1

but it's make my page php look like my error

PHP 5.5.9-1ubuntu4.14 Development Server started at Sat Feb 13 09:40:05 2016 Listening on XXXXXX .... 

Any Idea ?

1

There are 1 best solutions below

0
On

you could filer it out using grep.

php -S adress:port -t . | grep -v "Development Server started at" > logs.txt

And remember: The server is not supposed for productive use and log handling is just one of the limitations.