On Android I am using the android.util.Log to log within my application and during development I am using the adb logcat or Eclipse to see the logs – I use it even more then debugging…
On device I can save the logfile from my code or use some application form Android Market to save the logs – e.g. aLogCat.
Now can I do the same on the iPhone? I can use the NSLog(@"message");, but can I easily save the log file from my application and access it? Are there any ways for that?
Regards,
STeN
This is from NSFoundation reference
NSLog:
NSLogv:
Thus, it is only a matter of redirecting the file-descriptor “stderr” (2) to a custom file, and you will get everything that you print using NSLog in that file.
This seems to be exactly what you want.
Note that if you want to get logs on console when you are connected to the debugger, you can wrap your code around this to avoid redirection in this case: