Stellar output statistics
This commit is contained in:
@@ -153,7 +153,8 @@ static int parse_config(struct log_config *config, const char *cfg_file)
|
||||
fprintf(stderr, "config file %s missing log.file\n", cfg_file);
|
||||
goto error_out;
|
||||
}
|
||||
strncpy(config->log_file, ptr, sizeof(config->log_file) - 1);
|
||||
// skip ""
|
||||
strncpy(config->log_file, ptr + 1, strlen(ptr) - 2);
|
||||
}
|
||||
|
||||
// level
|
||||
@@ -200,7 +201,7 @@ static int log_reopen()
|
||||
new_fd = open(buff, O_WRONLY | O_APPEND | O_CREAT, 0644);
|
||||
if (new_fd == -1)
|
||||
{
|
||||
fprintf(stderr, "open() \"%s\" failed, %s", buff, strerror(errno));
|
||||
fprintf(stderr, "open() \"%s\" failed, %s\n", buff, strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user