According to M2.0 guide at http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-log.html it suggests the way to clean logs in Database, but in M2.1.x there is no such function available under ./bin/magento
.
My DB tables report_event
, report_viewed_product_index
, customer_visitor
contain more than a few million entries combined. That is pure cluttering of Database. In M1 there is an option of automatic logs cleaning via cron.
I want to keep up to dat褍 logs in these tables only for past 30 days and no more...
What is the option for M2.1.x?
@devdesco-ceo This is a badly needed function for sure, not just for DB, but other logs as well. @magento-team I hope this is in the works.
You bet!
@devdesco-ceo thank you for your feedback.
Please format your issue description according to the Issue reporting guidelines: with steps to reproduce, actual result and expected result.
1. Install Magento 2.1
1. Login to server via SSH (Magento CLI Version 2.1.2)
2. Run the bin/magento command
3. You will see that no commands are available to clear log tables
Expected result:
When running the bin/magento command I should see the commands for log cleaning
displayed under the list of available commands.
I should then be able to clear database logs by running the following command
magento log:clean [--days=<clean logs older than>]
Actual result:
No option is available for log cleaning which contradicts the following document.
In need of this badly
@viktor-zhuromskyy Hello, The GitHub issue tracker is intended for technical issues only. Please refer to the Community Forums or the Magento Stack Exchange site for technical questions.
@krutkoroma79911 This should be considered a feature request. One that is badly needed I might add. I don't know how much time I waste just clearing our junk that Magento should have a cron job for at the very least.
@viktor-zhuromskyy, hi, The GitHub issue tracker is intended for technical issues only. Please refer to the Community Forums or the Magento Stack Exchange site for technical questions.
@magento-engcom-team this is not a technical question but a feature request, it seems to me this issue has been closed erroneously, could you please reconsider? thanks!!!
Most helpful comment
@krutkoroma79911 This should be considered a feature request. One that is badly needed I might add. I don't know how much time I waste just clearing our junk that Magento should have a cron job for at the very least.