简体   繁体   中英

How to output PHP built-in web server logs to stdout?

是否有可能使PHP的内置Web服务器实例将错误和访问日志(仅针对该特定进程)发送到/dev/stderr/dev/stdout或文件,就像在python的内置Web服务器中一样

Achieved this by doing php -S 127.0.0.1:80 2>&1 >/dev/null > ./my-log-file.log

php -S 127.0.0.1:80 2>&1 >/dev/null | grep blablabla php -S 127.0.0.1:80 2>&1 >/dev/null | grep blablabla also works

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM