Contributions

Other (Category Index)
Search: 

Rotatelog

When the error log (new in osC v3) grows very large it will take to much memory to display and give an error:
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 144 bytes) in /path_to_admin_folder/admin/includes/applications/error_log/classes/error_log.php on line 28

This contribution adds functionality that will check the error log on logging in. If it is over 1 MB in size it will save the oldest lines to a backup file and leave the last 0.2 MB of error lines in the error log.
As a bonus you will get the option to archive the error log and start with an empty one (known as log rotation). osC alpha 5 only gives you the option of deleting the error log.

Expand All / Collapse All

Rotatelog v1.0 13 Apr 2009

When the error log (new in osC v3) grows very large it will take to much memory to display and give an error:
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 144 bytes) in /path_to_admin_folder/admin/includes/applications/error_log/classes/error_log.php on line 28

This contribution adds functionality that will check the error log on logging in. If it is over 1 MB in size it will save the oldest lines to a backup file and leave the last 0.2 MB of error lines in the error log.
As a bonus you will get the option to archive the error log and start with an empty one (known as log rotation). osC alpha 5 only gives you the option of deleting the error log.

Note: Contributions are used at own risk.