Open maiksprenger opened 11 years ago
Thanks for this! Yeah, I forgot to remove the PRINT_TIMINGS setting. Are you sure you are using the latest version? I don't see any console output at all from template-timings, I have to explicitly enable it. What logging settings are you using?
You're definitely "printing timings" aka logging in https://github.com/orf/django-debug-toolbar-template-timings/blob/master/template_timings_panel/panels/TemplateTimings.py#L33, and #L115. Those are the ones I see.
The logging settings we use are https://github.com/tangentlabs/django-oscar/blob/master/sites/sandbox/settings.py#L169
I think basically what I want as a feature is a way to suppress log output from your panel. That should be possible with tweaking oscar's logging settings appropriately, so I think there is no more issue. It probably would be nice-to-have to include docs on how to enable/disable logging using Django's logging settings. I might have a look into that, need to disable it for Oscar anyway.
Thanks!
For future reference, if anyone wonders how to disable this panel from logging to stdout / console:
'template_timings_panel.panels.TemplateTimings': {
# Set this to DEBUG to get console output
'level': 'INFO',
'handlers': ['console'],
'propagate': False,
},
As far as I can tell,
PRINT_TIMINGS
is not actually used anywhere in the code. django-oscar has enabled your (lovely!) panel by default for the sandbox, but I've just realized it trashes myrunserver
output. I realize I can change my logging settings to suppress it. But either way,PRINT_TIMINGS
should either be removed or supported ;)