]> git.itanic.dy.fi Git - rrdd/blobdiff - main.c
debug: Add support for log files
[rrdd] / main.c
diff --git a/main.c b/main.c
index 75eddf397076e82b0441961866f0242b3842b81b..55e1ef3fc046f349aecffa4adce7f987cb792762 100644 (file)
--- a/main.c
+++ b/main.c
@@ -25,9 +25,10 @@ int read_args(int argc, char *argv[], struct user_options *opts)
        static struct option long_options[] = {
                { .val = 'j', .has_arg = 1, .name = "jobs", },
                { .val = 'c', .has_arg = 1, .name = "config", },
+               { .val = 'l', .has_arg = 1, .name = "log-file", },
                { },
        };
-       char short_options[] = "j:c:";
+       char short_options[] = "j:c:l:";
 
        while (1) {
                c = getopt_long(argc, argv, short_options, long_options,
@@ -45,6 +46,10 @@ int read_args(int argc, char *argv[], struct user_options *opts)
                        opts->config_file = optarg;
                        break;
 
+               case 'l':
+                       open_log_file(optarg);
+                       break;
+
                case '?':
                        return -1;
                }