I am developing a Beta iOS (7 and 8) app which will be handed to testers soon.
I would like to have a send feedback button which will send the developers a human description of what went wrong, along with the recent log files.
Since writing log files can consume a lot of space, I would like to rotate the files based on their size, like the Linux logrotate utility. That is, write the first N log lines to a app.log
, then rename app.log
to app.log.1
, delete the old app.log.1
and continue writing to a new app.log
.
This way I will have at most 2N
log lines in the iOS filesystem, and on my error reports.
Is there an open-source, production-ready tool for file log rotation on iOS?