def add_program_config_arguments(cls, parser):
parser.add_argument(
"--cfg",
help="ARouteServer configuration file. "
"By default, the program looks for its configuration "
"file in the following paths: {}".format(
", ".join(program_config.DEFAULT_CFG_PATHS)),
metavar="FILE",
dest="cfg_program")
group = parser.add_argument_group(
title="Program configuration",
description="The following arguments override those provided "
"in the program's configuration file."
)
group.add_argument(
"--cache-dir",
help="Cache directory.",
metavar="DIR",
dest="cache_dir")
group.add_argument(
"--logging-config-file",
help="Logging configuration file, in Python fileConfig() format ("
"https://docs.python.org/2/library/logging.config.html"
"#configuration-file-format)",
dest="logging_config_file")
group.add_argument(
"--logging-level",
help="Logging level. Overrides any configuration given in the "
"logging configuration file.",
choices=["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"],
dest="logging_level")
评论列表
文章目录