graycoreio / magento2-stdlogging

A drop in Magento 2 Module to pump all Magento 2 logs to StdErr instead of files.
MIT License
22 stars 6 forks source link

[FEAT] Magento CRON logs to stdout #25

Open gitrequests opened 10 months ago

gitrequests commented 10 months ago

:bulb: Feature request

Magento CRON logs to stdout

As written in the documentation here from version Magento 2.3.1 CRON logs are sent to a separate file (<install-directory>/var/log/cron.log). In the Docker environment, they can also be sent to standard output.

I found that the cron log configuration is available in <install-directory>/vendor/magento/module-cron/etc/di.xml. Here are two virtual types: Magento\Cron\Model\VirtualLogger and Magento\Cron\Model\VirtualLoggerHandler.

Environment

magento2-stdlogging version: 2.0.0
Magento version: 2.4.6 
PHP Version version: 8.2.4