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 console.log() messages #5278
Comments
Does these logs occur on prod? |
Yes. Both dev and prod environment. |
You can customize the layout and override that function: {% extends 'SonataAdminBundle::standard_layout.html.twig' %}
{% block javascripts %}
{{ parent() }}
<script>
if ('undefined' !== typeof window.Admin) {
window.Admin.log = function() {}
}
</script>
{% endblock %} |
@bgaleotti Thanks, it works. |
But logging console messages even in production environment is the actual implementation or is it a bug? |
IMHO we should switch the actual behaviour. So that we have a logger function that does nothing, but you can override/enable it if you want |
Yes, I have overrided the standard_layout to disable it. Thanks for the support. Can I close this issue now? |
No please keep it to open until we have a better solution |
Sure |
I see many console log messages in the browser generated by Sonata admin bundle.
These messages are generated from /vendor/sonata-project/admin-bundle/src/Resources/public/Admin.js by the code,
I don't need these logs to be generated in the browser. Is there a way to control these from configuration file or something?
The text was updated successfully, but these errors were encountered: