Move deprecation warning after logging setup

This commit is contained in:
Peter Eckersley 2016-05-10 18:51:16 -07:00
parent ed23f2e27f
commit 22f6b77e68

View file

@ -649,7 +649,6 @@ def main(cli_args=sys.argv[1:]):
args = cli.prepare_and_parse_args(plugins, cli_args)
config = configuration.NamespaceConfig(args)
zope.component.provideUtility(config)
cli.possible_deprecation_warning(config)
# Setup logging ASAP, otherwise "No handlers could be found for
# logger ..." TODO: this should be done before plugins discovery
@ -662,6 +661,7 @@ def main(cli_args=sys.argv[1:]):
le_util.make_or_verify_dir(
config.logs_dir, 0o700, os.geteuid(), "--strict-permissions" in cli_args)
setup_logging(config, _cli_log_handler, logfile='letsencrypt.log')
cli.possible_deprecation_warning(config)
logger.debug("certbot version: %s", certbot.__version__)
# do not log `config`, as it contains sensitive data (e.g. revoke --key)!