1

I have a situation on my server, my log files are taking up too much space and I see that there are a lot of warnings that are being logged. I would want to disable notices logging for now and keep the disk space under check.

The change I added onto php.ini file was:

error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR

I restarted my apache and zend but I still see that notices are still being logged into the php.log file.

Please let me know if there is something else that I need to configure.

4
  • do you solve your problem? Commented Mar 24, 2015 at 20:09
  • 1
    Why not fix the notices? Commented Mar 24, 2015 at 20:17
  • 1
    @ceejayoz Why clean up when you can just hide the mess under the carpet? Commented Mar 24, 2015 at 20:18
  • @ceejayoz: We do not have resources to fix it and we have decided to just hide to errors since server space is a luxury we do not want to give up on logs. :) Commented Mar 25, 2015 at 5:33

1 Answer 1

1
// Report all errors except E_NOTICE
error_reporting(E_ALL & ~E_NOTICE)

You can read more at:

http://php.net/manual/en/function.error-reporting.php

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.