I have a cron script that outputs errors using error_log(). Sometimes, however, the log file can attain a large size. Does error_log() have native functions that automatically archive the log file after reaching a certain defined number of lines? I can write my own function to check the log file, but I would prefer using some native functions if there are any.
Thank you.
No, by default PHP offers these settings: Error Handling Runtime ConfigurationDocs.
You might want to setup a logrotator on your system, normally done with a cron task or daemon.