diff -r eb681a030699 -r 4ee15441f2eb server/serverctl.py --- a/server/serverctl.py Mon Jun 22 14:15:16 2015 +0200 +++ b/server/serverctl.py Mon Jun 22 14:27:37 2015 +0200 @@ -972,13 +972,19 @@ name = 'source-sync' arguments = ' ' min_args = max_args = 2 + options = ( + ('loglevel', + {'short': 'l', 'type' : 'choice', 'metavar': '', + 'default': 'info', 'choices': ('debug', 'info', 'warning', 'error'), + }), + ) def run(self, args): + from cubicweb.cwctl import init_cmdline_log_threshold config = ServerConfiguration.config_for(args[0]) config.global_set_option('log-file', None) config.log_format = '%(levelname)s %(name)s: %(message)s' - logger = logging.getLogger('cubicweb.sources') - logger.setLevel(logging.INFO) + init_cmdline_log_threshold(config, self['loglevel']) # only retrieve cnx to trigger authentication, close it right away repo, cnx = repo_cnx(config) cnx.close()