Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

DeDMakar

macrumors member
Original poster
Mar 24, 2008
39
0
I use example /Developer/Examples/Security/bannersample. I wish to write down processes of the app in log a file. Function NSLog gives a error. Syslog() and record in a file does not work. What to do?:confused:
 
Code:
#import <syslog.h>

int main(int argc, char *argv[])
{
    syslog(0, "my syslog message");
    return 0;
}
//Text in file /var/log/system.log
I have solved this problem: not system.log but secure.log.

Why I can not write down in a file?
record in a file:

Code:
int TextInFile(){
FILE *fp1;
fp1 = fopen("/Run.log", "a");
fprintf(fp1, "new first string enter from Main.c\n");
fclose(fp1);
return 0;
}
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.