LOFFILE -> LOGFILE
This commit is contained in:
parent
55dfaa0cee
commit
20d355a0f6
@ -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
|
||||||
|
@ -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
2
main.c
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user