Skip to content

Commit

Permalink
Merge pull request #42 from metwork-framework/missing_options
Browse files Browse the repository at this point in the history
fix: pass missing options -c, -o and -g from wrapper to logger process
  • Loading branch information
thebaptiste authored Feb 9, 2024
2 parents 1dae01b + 39ec789 commit ed02932
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/log_proxy_wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void spawn_logproxy_async(const gchar *fifo_path, const gchar *log_path) {
gchar *rotation_size_str = g_strdup_printf("%li", rotation_size);
gchar *rotation_time_str = g_strdup_printf("%li", rotation_time);
gchar *rotated_files_str = g_strdup_printf("%i", rotated_files);
gchar *argv[20] = {
gchar *argv[25] = {
"log_proxy",
"-s", rotation_size_str,
"-t", rotation_time_str,
Expand All @@ -79,6 +79,18 @@ void spawn_logproxy_async(const gchar *fifo_path, const gchar *log_path) {
argv[argc++] = "-T";
argv[argc++] = timestamp_prefix;
}
if (chmod_str != NULL) {
argv[argc++] = "-c";
argv[argc++] = chmod_str;
}
if (chown_str != NULL) {
argv[argc++] = "-o";
argv[argc++] = chown_str;
}
if (chgrp_str != NULL) {
argv[argc++] = "-g";
argv[argc++] = chgrp_str;
}
argv[argc++] = (gchar*) log_path;
argv[argc] = NULL;

Expand Down

0 comments on commit ed02932

Please sign in to comment.