This snippet will check if the error log becomes too large and
automatically rename it so that the system can create a new (empty) log.
When the logfile is renamed, a simple warning email will be sent to the email address configured in the website settings.
Configuration
The email address and the maximum size of the error log (default setting 3Mb) can be set via the file "settings.php".