[BUG] cache_invalidate errors when running magento cache:clean
acashley opened this issue Β· comments
π Bug report
Current Behavior
When clearing the cache, the following cache_invalidate debug output is observed in build logs:
/bin/php magento cache:clean
main.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["FPC"],"mode":"matchingTag"}} []
main.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["CONFIG"],"mode":"matchingTag"}} []
main.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["LAYOUT_GENERAL_CACHE_TAG"],"mode":"matchingTag"}} []
main.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["BLOCK_HTML"],"mode":"matchingTag"}} []
main.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["COLLECTION_DATA"],"mode":"matchingTag"}} []
main.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["REFLECTION"],"mode":"matchingTag"}} []
main.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["DB_DDL"],"mode":"matchingTag"}} []
main.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["COMPILED_CONFIG"],"mode":"matchingTag"}} []
main.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["EAV"],"mode":"matchingTag"}} []
main.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["CUSTOMER_NOTIFICATION"],"mode":"matchingTag"}} []
main.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["INTEGRATION"],"mode":"matchingTag"}} []
main.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["INTEGRATION_API_CONFIG"],"mode":"matchingTag"}} []
main.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["FPC"],"mode":"matchingTag"}} []
main.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["WEBSERVICE"],"mode":"matchingTag"}} []
main.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["TRANSLATE"],"mode":"matchingTag"}} []
15:35:40 Cleaned cache types:
15:35:40 config
15:35:40 layout
15:35:40 block_html
15:35:40 collections
15:35:40 reflection
15:35:40 db_ddl
15:35:40 compiled_config
15:35:40 eav
15:35:40 customer_notification
15:35:40 config_integration
15:35:40 config_integration_api
15:35:40 full_page
15:35:40 config_webservice
15:35:40 translate
15:35:40 vertex
Expected Behavior
Expect not to see these debug output/errors.
Minimal reproduction of the problem with instructions
- Install
magento2-stdlogging module - Run:
/bin/php magento cache:clean
What is the motivation / use case for changing the behavior?
Not sure why this output is logged now? Looks like the URL mentioned is malformed: GET","url":"http:/"
This output was not logged before installation of magento2-stdlogging module and disappears upon removal of the module.
Environment
magento2-stdlogging version: 1.3.8
Magento version: 2.4.2
PHP Version version: 7.4
Others:
CentOS 7
nginx
@acashley thanks for the report. I think this is a result of Magento's native cache.log. I've long wanted to remove it (it is incredibly annoying). I'll see if I can figure out docs on how to disable this log.
I don't think disabling it automatically is in the scope of this particular repo, but it's obnoxious enough that I think most people want to know how to disable it.
@acashley see https://devdocs.magento.com/guides/v2.4/config-guide/cli/logging.html#to-disable-debug-logging
bin/magento setup:config:set --enable-debug-logging=falseLet me know if this works for you. In a production environment, this should be off anyways.
But, locally, this is what I use to disable the cache logs.
@damienwebdev thanks for your quick reply!
Interesting, I see in the docs referenced that the debugging should be disabled by default in production mode, but I am still seeing this output in both developer and production modes.
By default, Magento writes to the debug log (<install_directory>/var/log/debug.log) when it is in default or develop mode, but not when it is in production mode.