You'll need to also fix the underlying problem that is generating errors, otherwise it'll just fill up again.
And more importantly, the error being logged might have some actual impact to your site or your users. Errors can mask deeper issues. In the worst case, it could even be an attacker probing your site and trying to break in.
At least triage the errors before emptying them.