开发者

Log file size in iPhone

I want to put all my app logs in a file in the Documents directory and then once user tap on "Upload logs" in the application, logs will be uploaded to server. I am planning to keep logs for two days. Is there any limit on the size which I can use for the logs?

开发者_StackOverflow中文版

Also, at all point in time I want to keep last 2 days logs and deleting the old ones. How can that be achieved?


Since you are storing them in the Documents directory, you are not bounded to a specific file size. As for only keeping the last two day's log files, you could just write a pruning function to delete any old ones and call it on app launch & resume from background.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜