D DeDMakar macrumors member Original poster Mar 24, 2008 39 0 Apr 21, 2008 #1 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?
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?
D DeDMakar macrumors member Original poster Mar 24, 2008 39 0 Apr 21, 2008 #2 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; }
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; }