Log Files are Big

My log files are big. Yesterday’s was 65mb. The majority are this:

[2015-10-27 15:34:57] mautic.CRITICAL: Uncaught PHP Exception LogicException: “The controller must return a response (null given). Did you forget to add a return statement somewhere in your controller?” at //app/bootstrap.php.cache line 3063 {“exception”:"[object] (LogicException(code: 0): The controller must return a response (null given). Did you forget to add a return statement somewhere in your controller? at //app/bootstrap.php.cache:3063)"} []

[2015-10-27 15:34:58] mautic.WARNING: PHP Warning: Cannot modify header information - headers already sent by (output started at //app/bootstrap.php.cache:1785) - in file //app/bundles/CoreBundle/Helper/CookieHelper.php - at line 61 [] []



A) What is causing these errors?

B) Can I control logging to only show critical errors?

C) Can I set Mautic to delete logs after 3 days instead of 7?

My log files are big. Yesterday’s was 65mb. The majority are this:
[2015-10-27 15:34:57] mautic.CRITICAL: Uncaught PHP Exception LogicException: “The controller must return a response (null given). Did you forget to add a return statement somewhere in your controller?” at //app/bootstrap.php.cache line 3063 {“exception”:"[object] (LogicException(code: 0): The controller must return a response (null given). Did you forget to add a return statement somewhere in your controller? at //app/bootstrap.php.cache:3063)"} []
[2015-10-27 15:34:58] mautic.WARNING: PHP Warning: Cannot modify header information - headers already sent by (output started at //app/bootstrap.php.cache:1785) - in file //app/bundles/CoreBundle/Helper/CookieHelper.php - at line 61 [] []

A) What is causing these errors?
B) Can I control logging to only show critical errors?
C) Can I set Mautic to delete logs after 3 days instead of 7?

A) see issue and solution https://github.com/mautic/mautic/issues/1049

Mautic 1.2.2 should fix those errors. It was released yesterday. Could you tell us if it got better after update?

I updated and didn’t see any immediate change, then went in and deleted all the cache files (you know it would be nice in the settings to have a button that flushed the cache for you), that seems to have slowed the messages down considerably. I will keep an eye on it today.

I have run 1.2.2 with the cache cleared for about 20 minutes now and no new errors have hit the log, previously I was getting at least 1 per second. I would say that it is resolved.

Great to hear that. The button for clearing the cache is a good idea. It might get lost from the sight of developers. If you report it to https://github.com/mautic/mautic/issues, it won’t get lost.

done

Thanks. For others, the feature request is here: https://github.com/mautic/mautic/issues/1086