0

I'm doing local development on a PHP project that is hosted in Heroku. I'm using Laravel Valet for my local environment, but it's not a Laravel project.

Heroku recommends writing to php://stderr.

When I execute this code...

$logger = new Logger('clever_name', [new StreamHandler('php://stderr')]);
$logger->critical('Critical');

...I can't figure out where the log is being written.

I've found two log files used by Valet:

  • ~/.config/valet/Log/nginx-error.log
  • ~/.config/valet/Log/php-fpm.log

Calls to error_log() write to php-fpm.log. What is php://stderr writing to?

Sonny
  • 8,204
  • 7
  • 63
  • 134

0 Answers0