Logging to a file on the iPhone

后端 未结 5 1605
暗喜
暗喜 2020-11-30 20:45

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

Ideally, NSLog() output could be redirected to a file using freop

5条回答
  •  情歌与酒
    2020-11-30 21:34

    Consider using Cocoa Lumberjack. It's a light but flexible utility to replace NSLog functionality. In my opinion it's in the same class as Log4J, allowing for custom appenders and the like. It has an SQLite logger, for example.

提交回复
热议问题