I guess this is a viable logger for FENIX
This commit is contained in:
parent
87e5b2e655
commit
a5122acea9
1 changed files with 22 additions and 0 deletions
22
logger.c
Normal file
22
logger.c
Normal file
|
@ -0,0 +1,22 @@
|
|||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char ** argv) {
|
||||
if(argc == 1) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
int i = 1;
|
||||
FILE * log = fopen("/var/log/syslog", "a+");
|
||||
if(log == NULL) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
fprintf(log, "\n");
|
||||
for(i = 1; i < argc - 1; i++) {
|
||||
fprintf(log, "%s ", argv[i]);
|
||||
}
|
||||
fprintf(log, "%s", argv[i]);
|
||||
|
||||
fclose(log);
|
||||
return 0;
|
||||
}
|
Loading…
Reference in a new issue