Francesco Romani has uploaded a new change for review.
Change subject: api: use recommended logging ......................................................................
api: use recommended logging
Update the logging in setLogLevel to use less convoluted and more modern idiom.
Change-Id: I91c3b4aa3344b5093d13fb11e017394cf0bf52b2 Signed-off-by: Francesco Romani fromani@redhat.com --- M vdsm/API.py 1 file changed, 1 insertion(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/22/38422/1
diff --git a/vdsm/API.py b/vdsm/API.py index 42c471e..6b8da3a 100644 --- a/vdsm/API.py +++ b/vdsm/API.py @@ -1369,8 +1369,7 @@
Doesn't survive a restart """ - logging.getLogger('clientIF.setLogLevel').info('Setting loglevel ' - 'to %s' % level) + logging.info('Setting loglevel to %s', level) handlers = logging.getLogger().handlers [fileHandler] = [h for h in handlers if isinstance(h, logging.FileHandler)]
automation@ovirt.org has posted comments on this change.
Change subject: api: use recommended logging ......................................................................
Patch Set 1:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
oVirt Jenkins CI Server has posted comments on this change.
Change subject: api: use recommended logging ......................................................................
Patch Set 1:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/16301/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/15501/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/16471/ : SUCCESS
Michal Skrivanek has posted comments on this change.
Change subject: api: use recommended logging ......................................................................
Patch Set 1:
(1 comment)
https://gerrit.ovirt.org/#/c/38422/1/vdsm/API.py File vdsm/API.py:
Line 1368: level: requested logging level. `logging.DEBUG` `logging.ERROR` Line 1369: Line 1370: Doesn't survive a restart Line 1371: """ Line 1372: logging.info('Setting loglevel to %s', level) this should imho be higher prio as you want to see the change when setting WARN and CRIT Line 1373: handlers = logging.getLogger().handlers Line 1374: [fileHandler] = [h for h in handlers if Line 1375: isinstance(h, logging.FileHandler)] Line 1376: fileHandler.setLevel(int(level))
Francesco Romani has posted comments on this change.
Change subject: api: use recommended logging ......................................................................
Patch Set 1: Code-Review-1
need to address Michal's comment. Point in case is: we do want to see that message (do we?) but it is not really 'critical'.
automation@ovirt.org has posted comments on this change.
Change subject: api: use recommended logging ......................................................................
Patch Set 2:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
oVirt Jenkins CI Server has posted comments on this change.
Change subject: api: use recommended logging ......................................................................
Patch Set 2:
Build Started (1/2) -> http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/18352/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: api: use recommended logging ......................................................................
Patch Set 2:
Build Started (2/2) -> http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/1582/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: api: use recommended logging ......................................................................
Patch Set 2:
Build Successful
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/18352/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/1582/ : SUCCESS
automation@ovirt.org has posted comments on this change.
Change subject: api: use recommended logging ......................................................................
Patch Set 3:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
Dan Kenigsberg has posted comments on this change.
Change subject: api: use recommended logging ......................................................................
Patch Set 3: Code-Review-1
(1 comment)
https://gerrit.ovirt.org/#/c/38422/3/vdsm/API.py File vdsm/API.py:
Line 1382: info yeah, makes sense to make it a "warning".
automation@ovirt.org has posted comments on this change.
Change subject: api: use recommended logging ......................................................................
Patch Set 4:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
automation@ovirt.org has posted comments on this change.
Change subject: api: use recommended logging ......................................................................
Patch Set 5:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
Francesco Romani has posted comments on this change.
Change subject: api: use recommended logging ......................................................................
Patch Set 5: Verified+1
verified running patched VDSM and triggering the API call; current vdsClient in master works, so does 42283
Dan Kenigsberg has posted comments on this change.
Change subject: api: use recommended logging ......................................................................
Patch Set 5: Code-Review+2
Dan Kenigsberg has submitted this change and it was merged.
Change subject: api: use recommended logging ......................................................................
api: use recommended logging
Update the logging in setLogLevel to use less convoluted and more modern idiom.
Change-Id: I91c3b4aa3344b5093d13fb11e017394cf0bf52b2 Signed-off-by: Francesco Romani fromani@redhat.com Reviewed-on: https://gerrit.ovirt.org/38422 Continuous-Integration: Jenkins CI Reviewed-by: Dan Kenigsberg danken@redhat.com --- M vdsm/API.py 1 file changed, 1 insertion(+), 2 deletions(-)
Approvals: Jenkins CI: Passed CI tests Dan Kenigsberg: Looks good to me, approved Francesco Romani: Verified
Objections: Jenkins CI: I would prefer that you didn't submit this
automation@ovirt.org has posted comments on this change.
Change subject: api: use recommended logging ......................................................................
Patch Set 6:
* Update tracker::IGNORE, no Bug-Url found * Set MODIFIED::IGNORE, no Bug-Url found.
vdsm-patches@lists.fedorahosted.org