Thursday, 15 September 2011

objective c - How to redirect certain NSLog output to a file -


I am using code to write all NSLogs in a text file. How do I choose NOLOGS, which I just need to file? NSArray * paths = NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, YES); NSString * document directory = [path item overindexx: 0]; NSString * logPath = [Document Directory Stringbacking Path Component: @ "MOVbandlog.txt"]; // Freepen ([logpath cStringUsingEncoding: NSASCIIStringEncoding], "a +", stderr); FreePen ([logpath filesystem refraction], "A +", Stadrer); You can create two versions of NSLog as MYLog using only NSLog, but will show on

Console.

So basically you need to create two macros or methods.

No comments:

Post a Comment