Merge lp:~canonical-platform-qa/snappy-ecosystem-tests/fix-logging-issue into lp:snappy-ecosystem-tests

Proposed by Heber Parrucci
Status: Merged
Approved by: Omer Akram
Approved revision: 49
Merged at revision: 50
Proposed branch: lp:~canonical-platform-qa/snappy-ecosystem-tests/fix-logging-issue
Merge into: lp:snappy-ecosystem-tests
Diff against target: 41 lines (+7/-4)
2 files modified
snappy_ecosystem_tests/environment/managers.py (+7/-0)
snappy_ecosystem_tests/environment/setup.py (+0/-4)
To merge this branch: bzr merge lp:~canonical-platform-qa/snappy-ecosystem-tests/fix-logging-issue
Reviewer Review Type Date Requested Status
Omer Akram (community) Approve
platform-qa-bot continuous-integration Approve
Review via email: mp+321113@code.launchpad.net

Commit message

Fix logging issue

Description of the change

Fix logging issue, right now the logging level is changed globally in snappy_ecosystem_tests/environment/setup.py

So when you run the tests you will see all the debug/info etc. of for example, paramiko in snappy-ecosystem-results.xml.

This MP changes the logging config only for the particular module so you do not get unnecessary information in the snappy-ecosystem-results.xml

To post a comment you must log in.
Revision history for this message
platform-qa-bot (platform-qa-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Omer Akram (om26er) wrote :

Looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'snappy_ecosystem_tests/environment/managers.py'
--- snappy_ecosystem_tests/environment/managers.py 2017-03-15 18:09:42 +0000
+++ snappy_ecosystem_tests/environment/managers.py 2017-03-27 20:24:25 +0000
@@ -19,6 +19,8 @@
19#19#
20"""Managers to setup the environment"""20"""Managers to setup the environment"""
2121
22import logging
23
22from snappy_ecosystem_tests.environment.constants import (24from snappy_ecosystem_tests.environment.constants import (
23 PROFILES, DEPENDENCIES)25 PROFILES, DEPENDENCIES)
24from snappy_ecosystem_tests.environment.containers.lxd import LXDDriver26from snappy_ecosystem_tests.environment.containers.lxd import LXDDriver
@@ -32,6 +34,11 @@
32 }34 }
33}35}
3436
37logging.basicConfig()
38REQUEST_LOGGER = logging.getLogger("requests.packages.urllib3")
39REQUEST_LOGGER.setLevel(logging.DEBUG)
40REQUEST_LOGGER.propagate = True
41
3542
36class _LXDManager:43class _LXDManager:
37 """Manager for lxd containers"""44 """Manager for lxd containers"""
3845
=== modified file 'snappy_ecosystem_tests/environment/setup.py'
--- snappy_ecosystem_tests/environment/setup.py 2017-03-15 17:11:23 +0000
+++ snappy_ecosystem_tests/environment/setup.py 2017-03-27 20:24:25 +0000
@@ -22,12 +22,8 @@
2222
23import argparse23import argparse
2424
25import logging
26
27from snappy_ecosystem_tests.environment.managers import _LXDManager25from snappy_ecosystem_tests.environment.managers import _LXDManager
2826
29logging.basicConfig(level=logging.DEBUG)
30
3127
32SUPPORTED_MODULES = {28SUPPORTED_MODULES = {
33 "lxd": _LXDManager29 "lxd": _LXDManager

Subscribers

People subscribed via source and target branches