diff --git a/src/acl/external/time_quota/ext_time_quota_acl.8 b/src/acl/external/time_quota/ext_time_quota_acl.8 index 579e0af17d7..92fd6611fbc 100644 --- a/src/acl/external/time_quota/ext_time_quota_acl.8 +++ b/src/acl/external/time_quota/ext_time_quota_acl.8 @@ -7,7 +7,7 @@ Version 1.0 . .SH SYNOPSIS .if !'po4a'hide' .B ext_time_quota_acl -.if !'po4a'hide' .B "[\-b database] [\-d] [\-p pauselen] [\-h] configfile +.if !'po4a'hide' .B "[\-b database] [\-d level] [\-p pauselen] [\-h] configfile . .SH DESCRIPTION .B ext_time_quota_acl @@ -36,7 +36,7 @@ Default is 300 seconds (5 minutes). . .if !'po4a'hide' .TP .if !'po4a'hide' .B "\-d" -Enables debug logging to stderr. +Sets verbosity level for debugging section 82 (0-9; defaults to 1; see debug_options). . .if !'po4a'hide' .TP .if !'po4a'hide' .B "\-h" diff --git a/src/acl/external/time_quota/ext_time_quota_acl.cc b/src/acl/external/time_quota/ext_time_quota_acl.cc index 6a8796a18cb..32765382e96 100644 --- a/src/acl/external/time_quota/ext_time_quota_acl.cc +++ b/src/acl/external/time_quota/ext_time_quota_acl.cc @@ -328,13 +328,13 @@ static void usage(void) debugs(MY_DEBUG_SECTION, DBG_CRITICAL, "Wrong usage. Please reconfigure in squid.conf."); std::cerr << - "Usage: " << program_name << " [-d] [-b dbpath] [-p pauselen] [-h] configfile\n" - " -d enable debugging output\n" - " -l logfile log messages to logfile\n" - " -b dbpath Path where persistent session database will be kept\n" - " If option is not used, then " DEFAULT_QUOTA_DB " will be used.\n" - " -p pauselen length in seconds to describe a pause between 2 requests.\n" - " -h show show command line help.\n" + "Usage: " << program_name << " [-d level] [-b dbpath] [-p pauselen] [-h] configfile\n" << + " -d level set section " << MY_DEBUG_SECTION << " debugging to the specified level,\n" + " overwriting Squid's debug_options (default: 1)\n" + " -b dbpath Path where persistent session database will be kept\n" << + " If option is not used, then " << DEFAULT_QUOTA_DB << " will be used.\n" << + " -p pauselen length in seconds to describe a pause between 2 requests.\n" << + " -h show show command line help.\n" << "configfile is a file containing time quota definitions.\n"; } @@ -346,10 +346,10 @@ int main(int argc, char **argv) program_name = argv[0]; Debug::NameThisHelper("ext_time_quota_acl"); - while ((opt = getopt(argc, argv, "dp:b:h")) != -1) { + while ((opt = getopt(argc, argv, "d:p:b:h")) != -1) { switch (opt) { case 'd': - Debug::Levels[MY_DEBUG_SECTION] = DBG_DATA; + Debug::parseOptions(ToSBuf(MY_DEBUG_SECTION, ",", optarg).c_str()); break; case 'b': db_path = optarg;