LOFFILE -> LOGFILE

This commit is contained in:
aixiao 2020-10-22 14:20:05 +08:00
parent 55dfaa0cee
commit 20d355a0f6
3 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@
PROCESS_NAME = "frpc"; //进程名称条件变量 PROCESS_NAME = "frpc"; //进程名称条件变量
COMMAND = "ls -al"; //进程名称条件变量不成立执行的命令 COMMAND = "ls -al"; //进程名称条件变量不成立执行的命令
TIME = "10"; //时间条件变量, 单位秒 TIME = "10"; //时间条件变量, 单位秒
LOFFILE = "log.txt"; //日志记录 LOGFILE = "log.txt"; //日志记录
} }
### Build ### Build

View File

@ -2,5 +2,5 @@ global {
PROCESS_NAME = "frpc"; PROCESS_NAME = "frpc";
COMMAND = "ls -al"; COMMAND = "ls -al";
TIME = "10"; TIME = "10";
LOFFILE = "log.txt"; LOGFILE = "log.txt";
} }

2
main.c
View File

@ -53,7 +53,7 @@ char *times()
int logs(char *str, char *configfile) int logs(char *str, char *configfile)
{ {
FILE *fp = NULL; FILE *fp = NULL;
fp = fopen(read_conf(configfile, "global", "LOFFILE"), "a+"); fp = fopen(read_conf(configfile, "global", "LOGFILE"), "a+");
fprintf(fp, str); fprintf(fp, str);
return fclose(fp); return fclose(fp);
} }