Skip to content

Commit

Permalink
[#125] Clear log_apth setting
Browse files Browse the repository at this point in the history
  • Loading branch information
jesperpedersen committed Jan 4, 2021
1 parent 1054d0b commit 4ada26c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ main(int argc, char **argv)
config = (struct configuration*)shmem;

config->log_type = PGAGROAL_LOGGING_TYPE_FILE;
memset(&config->log_path[0], 0, MISC_LENGTH);
memcpy(&config->log_path[0], logfile, MIN(MISC_LENGTH - 1, strlen(logfile)));
}

Expand Down Expand Up @@ -271,6 +272,7 @@ main(int argc, char **argv)
config = (struct configuration*)shmem;

config->log_type = PGAGROAL_LOGGING_TYPE_FILE;
memset(&config->log_path[0], 0, MISC_LENGTH);
memcpy(&config->log_path[0], logfile, MIN(MISC_LENGTH - 1, strlen(logfile)));
}

Expand Down

0 comments on commit 4ada26c

Please sign in to comment.