Is there a way to rotate each user's error_log?

Ishware

Well-Known Member
Nov 7, 2003
211
6
168
Williamsburg, VA
cPanel Access Level
Root Administrator
Is there a cPanel-friendly way I can have each user's error_log (i.e. in /home/$user/public_html) automatically rotated?

I have a lot of accounts on my server that are building up large error logs, and it becomes a support issue. I'd like to keep them at a maximum size of 100mb...

Thanks for any advice!
 

quietFinn

Well-Known Member
Feb 4, 2006
1,894
463
438
Finland
cPanel Access Level
Root Administrator
Is there a cPanel-friendly way I can have each user's error_log (i.e. in /home/$user/public_html) automatically rotated?
No there is not.


I have a lot of accounts on my server that are building up large error logs, and it becomes a support issue. I'd like to keep them at a maximum size of 100mb...
Fix the sites so that they do not generate errors.
 

Ishware

Well-Known Member
Nov 7, 2003
211
6
168
Williamsburg, VA
cPanel Access Level
Root Administrator
Fix the sites so that they do not generate errors.
Clearly, the solution is for me to spend hours upon hours fixing my clients' code instead of seeking a way to minimize the actual problem.

For that matter, why am I using cPanel anyway, if I could just manually set up everything I needed to do?

Also, I happen to know you're wrong about there not being a solution: when I googled to try and find a solution, I found a package - I think it was logrotate or something similarly clearly named (I'll re-find it if I get to that point) - but I'd rather not mess with it if there's an easier way.

But if nobody has any better suggestions, I'll get something working. So yes, there is a solution out there - if not multiple. It's pretty clear I'm not the only one who has wanted this functionality.
 

quietFinn

Well-Known Member
Feb 4, 2006
1,894
463
438
Finland
cPanel Access Level
Root Administrator
Clearly, the solution is for me to spend hours upon hours fixing my clients' code instead of seeking a way to minimize the actual problem.
The actual problem is that your clients' sites generate errors, the error logs are just symptoms of the problem.

For that matter, why am I using cPanel anyway, if I could just manually set up everything I needed to do?
Yes of course. You can also write your own compiler. :D

Also, I happen to know you're wrong about there not being a solution: when I googled to try and find a solution, I found a package - I think it was logrotate or something similarly clearly named (I'll re-find it if I get to that point) - but I'd rather not mess with it if there's an easier way.
I know that. But because you asked "Is there a cPanel-friendly way ..." I assumed you meant something you can set up / configure in cPanel/WHM.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,260
463

Ishware

Well-Known Member
Nov 7, 2003
211
6
168
Williamsburg, VA
cPanel Access Level
Root Administrator
Well, shucks, the option to disable error reporting is awesome and simple. Didn't think to check if something like that existed. And definitely didn't find anything like the other thread when searching for solutions.

Thank you very very much! :D