Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introducing a dedicated cron.log file for logging cron related info, … #18209

Merged

Conversation

hostep
Copy link
Contributor

@hostep hostep commented Sep 23, 2018

…this reduces output in the system.log file.

Description

Magento 2.2.5 introduced better handling of cron job locking, but also added some extra logging output. This happened in f274f03 (file: app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php).
For example, following extra output is logged now:

  • Cron Job sales_send_order_emails is run
  • Cron Job sales_send_order_emails is successfully finished. Statistics: {"sum":0.00037288665771484,"count":1,"realmem":0,"emalloc":752,"realmem_start":39845888,"emalloc_start":36019592}
  • ...

But all this gets logged in the system.log file, and it happens for every cron job. Some of them run every single minute, so this causes a lot of extra output in the system.log file, which makes it harder to find other non-cron related output in that file.

This PR introduces a new file cron.log where all cron related output gets logged.

Fixed Issues (if relevant)

  1. system.log rapidly increasing after Magento CE 2.2.5 update (cron logs) #17190: system.log rapidly increasing after Magento CE 2.2.5 update (cron logs)

Manual testing scenarios

  1. Set up a clean Magento
  2. Run bin/magento cron:run
  3. Expect to see no cron related messages in system.log, but now in a dedicated cron.log file

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@magento-engcom-team
Copy link
Contributor

Hi @hostep. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me $VERSION instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

@VladimirZaets
Copy link
Contributor

@magento-engcom-team give me test instance

@magento-engcom-team
Copy link
Contributor

Hi @VladimirZaets. Thank you for your request. I'm working on Magento instance for you

@magento-engcom-team
Copy link
Contributor

Hi @VladimirZaets, here is your new Magento instance.
Admin access: https://pr-18209.engcom.dev.magento.com/admin
Login: admin Password: 123123q

@miguelbalparda miguelbalparda self-assigned this Sep 26, 2018
@slavvka slavvka self-assigned this Sep 28, 2018
@magento-engcom-team magento-engcom-team added this to the Release: 2.3.1 milestone Sep 28, 2018
@magento-engcom-team
Copy link
Contributor

Hi @slavvka, thank you for the review.
ENGCOM-3062 has been created to process this Pull Request

@magento-engcom-team
Copy link
Contributor

Hi @hostep. Thank you for your contribution.
We will aim to release these changes as part of 2.3.1.
Please check the release notes for final confirmation.

@slavvka
Copy link
Member

slavvka commented Oct 3, 2018

Hi @hostep, we need the fix to be delivered also to 2.2-develop branch so please don't forget to port this PR to 2.2-develop; you can do it easily using the Porting Tool, https://devdocs.magento.com/guides/v2.2/contributor-guide/contributing.html#porting-tool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants