]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Add new command line option --logOutputLevel
authorMike Brady <mikebrady@eircom.net>
Fri, 7 Apr 2017 18:00:02 +0000 (19:00 +0100)
committerMike Brady <mikebrady@eircom.net>
Fri, 7 Apr 2017 18:00:02 +0000 (19:00 +0100)
shairport.c

index 55baf671bc0f8d2f457f1a842bf98db8023a1f1c..3e34d60ce2943599d25f857a99023e221bafedde 100644 (file)
@@ -250,7 +250,8 @@ void usage(char *progname) {
          "88) before trying to correct it.\n");
   printf("    --password=PASSWORD     require PASSWORD to connect. Default is not to require a "
          "password.\n");
-#ifdef CONFIG_METADATA
+  printf("    --logOutputLevel        log the output level setting -- useful for setting maximum volume.\n");
+ #ifdef CONFIG_METADATA
   printf("    --metadata-pipename=PIPE send metadata to PIPE, e.g. "
          "--metadata-pipename=/tmp/shairport-sync-metadata.\n");
   printf("                            The default is /tmp/shairport-sync-metadata.\n");
@@ -280,6 +281,7 @@ int parse_options(int argc, char **argv) {
       {"daemon", 'd', POPT_ARG_NONE, &config.daemonise, 0, NULL},
       {"configfile", 'c', POPT_ARG_STRING, &config.configfile, 0, NULL},
       {"statistics", 0, POPT_ARG_NONE, &config.statistics_requested, 0, NULL},
+      {"logOutputLevel", 0, POPT_ARG_NONE, &config.logOutputLevel, 0, NULL},
       {"version", 'V', POPT_ARG_NONE, NULL, 0, NULL},
       {"port", 'p', POPT_ARG_INT, &config.port, 0, NULL},
       {"name", 'a', POPT_ARG_STRING, &raw_service_name, 0, NULL},
@@ -492,7 +494,7 @@ int parse_options(int argc, char **argv) {
 
       /* Get the optional volume_max_db setting. */
       if (config_lookup_float(config.cfg, "general.volume_max_db", &dvalue)) {
-        debug(1, "Max volume setting of %f dB", dvalue);
+        // debug(1, "Max volume setting of %f dB", dvalue);
         config.volume_max_db = dvalue;
         config.volume_max_db_set = 1;
       }