I want to be able to write the contents of NSLog to a file I specify, or I need a function that writes a log to a file, for example:
WriteLog(@"some activity by the user");
WriteLog(@"some more activity by the user");
but I want the output to look like this:
12-25-2009 1:30:00PM some activity by the user
12-25-2009 1:35:00PM some more activity by the user
does anyone know how I can do this? Note that I need the date and time at the beginning of the line.
ALSO: for some reason, freopen WILL NOT write any data to the file, it will create the file, just no output!