user1057161
user1057161

Reputation: 79

php error_log() archive log files

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.

Upvotes: 2

Views: 611

Answers (1)

hakre
hakre

Reputation: 197732

No, by default PHP offers these settings: Error Handling Runtime Configuration­Docs.

You might want to setup a logrotator on your system, normally done with a cron task or daemon.

Upvotes: 3

Related Questions