I think the log file is there because of the application settings, not the code changes.
The error you are seeing is due to php not having enough memory. This could be due to either your PHP settings, or a machine with low spec.
A limit of 2097152 is around 2 M which is very low.
You can change the limit in the same file by adding the line to set this to 16 M. You can try other values - 32, 64, 128, 256, 512, 1024 etc.
As a last resort, but only to see if this is really the issue, not to fix (because this is a bad practice, try to set no limit.
You don’t have to restart apache. Just refresh the page.