Can't figure out how to disable debug output to debug.log for things like cache invalidation, etc. In production mode this information is not necessary to log.
[2016-05-01 02:17:20] main.DEBUG: cache_invalidate: {"method":"GET","url":"https://endohaus.com/checkout/cart/","invalidateInfo":{"tags":["rewards_purchase"],"mode":"matchingAnyTag"},"is_exception":false} []
[2016-05-01 02:17:20] main.DEBUG: cache_invalidate: {"method":"GET","url":"https://endohaus.com/checkout/cart/","invalidateInfo":{"tags":["rewards_purchase_55","rewards_purchase"],"mode":"matchingAnyTag"},"is_exception":false} []
[2016-05-01 02:17:20] main.DEBUG: cache_invalidate: {"method":"GET","url":"https://endohaus.com/checkout/cart/","invalidateInfo":{"tags":["rewards_purchase_55","rewards_purchase"],"mode":"matchingAnyTag"},"is_exception":false} []
[2016-05-01 02:17:21] main.DEBUG: cache_invalidate: {"method":"GET","url":"https://endohaus.com/checkout/cart/","invalidateInfo":{"tags":["rewards_purchase"],"mode":"matchingAnyTag"},"is_exception":false} []
[2016-05-01 02:17:21] main.DEBUG: cache_invalidate: {"method":"GET","url":"https://endohaus.com/checkout/cart/","invalidateInfo":{"tags":["rewards_purchase_55","rewards_purchase"],"mode":"matchingAnyTag"},"is_exception":false} []
[2016-05-01 02:17:21] main.DEBUG: cache_invalidate: {"method":"GET","url":"https://endohaus.com/checkout/cart/","invalidateInfo":{"tags":["rewards_purchase_55","rewards_purchase"],"mode":"matchingAnyTag"},"is_exception":false} []
[2016-05-01 02:18:14] main.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["helpdesk_gateway"],"mode":"matchingAnyTag"},"is_exception":false} []
[2016-05-01 02:18:14] main.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["helpdesk_gateway_1","helpdesk_gateway"],"mode":"matchingAnyTag"},"is_exception":false} []
[2016-05-01 02:18:14] main.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["helpdesk_gateway_1","helpdesk_gateway"],"mode":"matchingAnyTag"},"is_exception":false} []
[2016-05-01 02:18:14] main.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["helpdesk_gateway"],"mode":"matchingAnyTag"},"is_exception":false} []
[2016-05-01 02:18:14] main.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["helpdesk_gateway_2","helpdesk_gateway"],"mode":"matchingAnyTag"},"is_exception":false} []
[2016-05-01 02:18:14] main.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["helpdesk_gateway_2","helpdesk_gateway"],"mode":"matchingAnyTag"},"is_exception":false} []
[2016-05-01 02:18:14] main.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["helpdesk_gateway"],"mode":"matchingAnyTag"},"is_exception":false} []
[2016-05-01 02:18:14] main.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["helpdesk_gateway_3","helpdesk_gateway"],"mode":"matchingAnyTag"},"is_exception":false} []
[2016-05-01 02:18:14] main.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["helpdesk_gateway_3","helpdesk_gateway"],"mode":"matchingAnyTag"},"is_exception":false} []
Same thing is with system.log
Anyone has an idea?
I think I'll PR a debug switch for that. Logs get too cluttered.
Yes, there should be an interface or option to set logging verbosity level directly in app/etc/env.php
@adragus-inviqa that would be very helpful
Internal ticket MAGETWO-52767
I'm also interested in this
I wonder how such a mainline functionality has been missed. After all - M2 is using Monolog by default.
Sorry, peeps. Not much time to do this. Consider it "up for grabs".
This issue has been fixed and delivered to mainline.
DId this ever actually make it into the core? Still having this issue on 2.1.3, dont see where to change it.
I'm also interested to hear how to configure a production instance of M2 to _not_ log the cache_invalidate strings to var/log/debug.log
@okorshenko @andimov Any idea why this never actually made it to the core?
So, how to decrease log verbosity level to debug.log in production mode?
@nikonratm @erikhansen @LucScu looking at commits in this issue it seems that dev/debug/debug_logging configuration option is responsible for this in dev mode. However, it looks like the fix is only present in develop branch currently.
As a workaround I believe it would not hurt simply symlink var/log/debug.log to /dev/null: http://serverfault.com/a/779437
@orlangur Great, i'll see if it is fixed in last release.
I don't see anything in EE 2.1.7 can we get some more info on where this setting is in the Admin Panel?
=> i added that preference , but some how it called first Magento\Framework\Logger\Handler\Debug
then Magento\Developer\Model\Logger\Handler\Debug,
so still magento creating debug.log file.
Any idea?
I still have the same debug log entry in 2.2.2:
[2018-01-09 17:01:16] main.DEBUG: cache_invalidate: {"method":"GET","ur...
@simonmaass and any others: it appears this will be fixed in 2.3.
I'm leaving this here incase anyone looks at this issue thread and tries to figure out why the debug.log file is empty on 2.2.x: Stack Exchange - debug.log file is empty in Magento 2.2.x
Most helpful comment
@simonmaass and any others: it appears this will be fixed in 2.3.