laravel / framework

The Laravel Framework.
https://laravel.com
MIT License
32.52k stars 11.02k forks source link

Scheduled Tasks should be able to output to STDOUT - currently forced to /dev/null or file #47443

Closed kingIZZZY closed 1 year ago

kingIZZZY commented 1 year ago

Laravel Version

9.29.0

PHP Version

8.1.20

Database Driver & Version

No response

Description

Scheduled Tasks seem to force output to /dev/null unless a local disk file is provided to write output to.

On Docker-based or similar deploy-code / spin-up-instances hosting services like heroku.com or fly.io etc. local files are usually ephemeral and thus local log files are quite useless. These hosts usually offer a live scrolling app output console log that can be monitored, very useful to catch live exceptions or view logged notices/warnings etc.

It would seem very desirable and necessary to have the option to let schedule:run allow laravel Schedule Events' output to proceed on to STDOUT along with all other app output. Suppressing it to /dev/null with no option to allow it through to STDOUT seems like blocking useful options for many deployment environments.

Steps To Reproduce

Some relevant links

driesvints commented 1 year ago

Heya, thanks for submitting this.

This seems like a feature request or an improvement so I'm converting this to a discussion instead. It's best to post these in the discussions section in the future to get support for your idea. After that you may send a PR to the framework. Please only use the laravel/framework issue tracker to report bugs and issues with the framework.

Thanks!