记录到iPhone上的文件 [英] Logging to a file on the iPhone

查看:113
本文介绍了记录到iPhone上的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将日志语句写入iPhone应用程序中的文件或数据库的最佳方法是什么?

What would be the best way to write log statements to a file or database in an iPhone application?

理想情况下,NSLog()输出可以重定向到文件使用freopen(),但我看到几个报告它不起作用。有没有人已经这样做或有任何想法如何最好地做到这一点?

Ideally, NSLog() output could be redirected to a file using freopen(), but I've seen several reports that it doesn't work. Does anyone have this going already or have any ideas how this might best be done?

谢谢!

推荐答案

我已成功在手机上使用freopen(...)将输出重定向到我自己的文件。

I've successfully used freopen(...) on the phone to re-direct output to my own file.

这篇关于记录到iPhone上的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆