[PATCH 1 of 4 V2] [cubicweb-ctl] backport --loglevel option of pyramid to all instance commands

Denis Laxalde denis.laxalde at logilab.fr
Tue Jul 30 15:12:27 CEST 2019


Laurent Peuch a écrit :
> # HG changeset patch
> # User Laurent Peuch <cortex at worlddomination.be>
> # Date 1558454897 -7200
> #      Tue May 21 18:08:17 2019 +0200
> # Node ID 2e5939059a2f13e21d18104fb4c6977d4e513808
> # Parent  eb83daa6949545bb81bcac6b5fda41d73a37837a
> # EXP-Topic improve-cli
> [cubicweb-ctl] backport --loglevel option of pyramid to all instance commands

This does not work for with "cubicweb-ctl pyramid -D -linfo <appid>"; I
get DEBUG messages so it seems that -l is ignored.

> diff --git a/cubicweb/pyramid/pyramidctl.py b/cubicweb/pyramid/pyramidctl.py
> --- a/cubicweb/pyramid/pyramidctl.py
> +++ b/cubicweb/pyramid/pyramidctl.py

> @@ -369,7 +364,6 @@ class PyramidStartHandler(InstanceComman
>          if self['dbglevel']:
>              self['loglevel'] = 'debug'
>              set_debug('|'.join('DBG_' + x.upper() for x in self['dbglevel']))

Here it's not clear to me why set_debug() call is kept here and not
moved along with init_cmdline_log_threshold() call. Can you explain?
(I'm not familiar with the logging setup.)

> -        init_cmdline_log_threshold(cwconfig, self['loglevel'])
>  
>          app = wsgi_application_from_cwconfig(
>              cwconfig, profile=self['profile'],



More information about the cubicweb-devel mailing list