Magento – How to disable “Cron Job” logging into system.log file in Magento 2

cronloggingmagento2magento2.2

My logs are being flooded with cron jobs updates. How can I disable this?

[2019-02-27 06:28:02] main.INFO: Cron Job outdated_authentication_failures_cleanup is run [] []
[2019-02-27 06:28:02] main.INFO: Cron Job outdated_authentication_failures_cleanup is successfully finished. Statistics: {"sum":0.00048398971557617,"count":1,"realmem":0,"emalloc":1128,"realmem_start":138412032,"emalloc_start":136589928} [] []
[2019-02-27 06:28:03] main.INFO: Cron Job magento_newrelicreporting_cron is run [] []
[2019-02-27 06:28:03] main.INFO: Cron Job magento_newrelicreporting_cron is successfully finished. Statistics: {"sum":0.0003509521484375,"count":1,"realmem":0,"emalloc":752,"realmem_start":140509184,"emalloc_start":137617904} [] []
[2019-02-27 06:28:03] main.INFO: Cron Job indexer_reindex_all_invalid is run [] []
[2019-02-27 06:28:03] main.INFO: Cron Job indexer_reindex_all_invalid is successfully finished. Statistics: {"sum":0.0062119960784912,"count":1,"realmem":0,"emalloc":551552,"realmem_start":134217728,"emalloc_start":121324440} [] []
[2019-02-27 06:28:03] main.INFO: Cron Job indexer_update_all_views is run [] []

And so on ….

I found this in official docs: https://devdocs.magento.com/guides/v2.3/config-guide/cli/config-cli-subcommands-cron.html

However, it doesn't say how to disable the logs…

I want to disable the logs for cron only. How can I achieve this? Is there a admin config or I have to do it manually?

Best Answer

Another solution would be to make cron log file read only. Not a great solution but same as having a cron log cleaning process in place in my opinion.

Related Topic