opt: reduce debug log

This commit is contained in:
DreamMaoMao 2025-03-16 10:11:20 +08:00
parent af51e86b32
commit cc74565a9c
2 changed files with 2 additions and 2 deletions

View file

@ -4927,7 +4927,7 @@ void signalhandler(int signalnumber) {
} }
// 打开日志文件 // 打开日志文件
FILE *fp = fopen(filename, "a"); FILE *fp = fopen(filename, "w");
if (!fp) { if (!fp) {
// 如果无法打开日志文件,则不处理 // 如果无法打开日志文件,则不处理
return; return;

View file

@ -480,7 +480,7 @@ FuncType parse_func_name(char *func_name, Arg *arg, char *arg_value) {
void parse_config_line(Config *config, const char *line) { void parse_config_line(Config *config, const char *line) {
char key[256], value[256]; char key[256], value[256];
if (sscanf(line, "%[^=]=%[^\n]", key, value) != 2) { if (sscanf(line, "%[^=]=%[^\n]", key, value) != 2) {
fprintf(stderr, "Error: Invalid line format: %s\n", line); // fprintf(stderr, "Error: Invalid line format: %s\n", line);
return; return;
} }