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

Disable debug output to debug.log #4362

Closed
viktor-zhuromskyy opened this issue May 1, 2016 · 19 comments
Closed

Disable debug output to debug.log #4362

viktor-zhuromskyy opened this issue May 1, 2016 · 19 comments
Labels
bug report Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@viktor-zhuromskyy
Copy link

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?

@adragus-inviqa
Copy link
Contributor

adragus-inviqa commented May 1, 2016

<item name="class" xsi:type="string">Magento\Framework\Cache\Frontend\Decorator\Logger</item>

I think I'll PR a debug switch for that. Logs get too cluttered.

@viktor-zhuromskyy
Copy link
Author

Yes, there should be an interface or option to set logging verbosity level directly in app/etc/env.php

@piotrekkaminski
Copy link
Contributor

@adragus-inviqa that would be very helpful

@piotrekkaminski
Copy link
Contributor

Internal ticket MAGETWO-52767

@mazhalai mazhalai added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development PS labels May 13, 2016
@atIOCrON
Copy link

I'm also interested in this

@jsakars
Copy link

jsakars commented Jul 1, 2016

I wonder how such a mainline functionality has been missed. After all - M2 is using Monolog by default.

@adragus-inviqa
Copy link
Contributor

Sorry, peeps. Not much time to do this. Consider it "up for grabs".

@andimov
Copy link
Contributor

andimov commented Aug 16, 2016

This issue has been fixed and delivered to mainline.

@shamoon
Copy link

shamoon commented Jan 21, 2017

DId this ever actually make it into the core? Still having this issue on 2.1.3, dont see where to change it.

@erikhansen
Copy link
Contributor

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

@shamoon
Copy link

shamoon commented Feb 9, 2017

@okorshenko @andimov Any idea why this never actually made it to the core?

@LucScu
Copy link

LucScu commented Mar 1, 2017

So, how to decrease log verbosity level to debug.log in production mode?

@orlangur
Copy link
Contributor

orlangur commented Mar 1, 2017

@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

@LucScu
Copy link

LucScu commented Jun 27, 2017

@orlangur Great, i'll see if it is fixed in last release.

@SAN1TAR1UM
Copy link

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?

@sunilit42
Copy link
Contributor

=> 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?

@simonmaass
Copy link

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...

@magento-engcom-team magento-engcom-team added the Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed label Jan 10, 2018
@scottsb
Copy link
Member

scottsb commented Jan 28, 2018

@simonmaass and any others: it appears this will be fixed in 2.3.

@erikhansen
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests