From: Mike Brady Date: Fri, 7 Apr 2017 18:00:02 +0000 (+0100) Subject: Add new command line option --logOutputLevel X-Git-Tag: 3.1.s5~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d8fbb75727ed19dde1ee67f997bf3d7f36f320d;p=thirdparty%2Fshairport-sync.git Add new command line option --logOutputLevel --- diff --git a/shairport.c b/shairport.c index 55baf671..3e34d60c 100644 --- a/shairport.c +++ b/shairport.c @@ -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; }