I want to create two log files in my iPhone application. If I redirect the NSLog output to a file using freopen(), then all the log statements will go into one mentioned files.
But I want to put some log statements into one file while some into different file.
Any idea, how can I do that?
The best approach would be to write your own logger class as a drop in replacement that you use instead of NSLog(). That way you can easily determine in run-time which logs should be written to which file. Your custom class can use NLog() to write to the console at the same time. This seems like the optimum approach, since freopen()
simply bulk redirects all log output.