Skip to content

Commit 7b7f95f

Browse files
committed
bugzilla: Use standard logging setup
1 parent 29b65a1 commit 7b7f95f

5 files changed

Lines changed: 10 additions & 15 deletions

File tree

bugzilla/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
# option) any later version. See http://www.gnu.org/copyleft/gpl.html for
1010
# the full text of the license.
1111

12+
from logging import getLogger
1213
import sys
1314

1415
if hasattr(sys.version_info, "major") and sys.version_info.major >= 3:
@@ -23,9 +24,10 @@
2324
from .base import RequestsTransport as _RequestsTransport
2425
from .bugzilla3 import Bugzilla3, Bugzilla32, Bugzilla34, Bugzilla36
2526
from .bugzilla4 import Bugzilla4, Bugzilla42, Bugzilla44
26-
from .logsetup import log
2727
from .rhbugzilla import RHBugzilla, RHBugzilla3, RHBugzilla4
2828

29+
log = getLogger(__name__)
30+
2931

3032
# Back compat for deleted NovellBugzilla
3133
class NovellBugzilla(Bugzilla34):

bugzilla/base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
# the full text of the license.
1111

1212
import locale
13+
from logging import getLogger
1314
import os
1415
import sys
1516

@@ -33,8 +34,8 @@
3334

3435
from .apiversion import __version__
3536
from .bug import _Bug, _User
36-
from .logsetup import log
3737

38+
log = getLogger(__name__)
3839

3940
# Backwards compatibility
4041
Bug = _Bug

bugzilla/bug.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@
1010
# the full text of the license.
1111

1212
import locale
13+
from logging import getLogger
1314
import sys
1415

15-
from .logsetup import log
16+
log = getLogger(__name__)
1617

1718

1819
class _Bug(object):

bugzilla/logsetup.py

Lines changed: 0 additions & 11 deletions
This file was deleted.

bugzilla/rhbugzilla.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@
99
# option) any later version. See http://www.gnu.org/copyleft/gpl.html for
1010
# the full text of the license.
1111

12+
from logging import getLogger
1213

1314
from .bugzilla4 import Bugzilla44 as _parent
14-
from .logsetup import log
15+
16+
log = getLogger(__name__)
1517

1618

1719
class RHBugzilla(_parent):

0 commit comments

Comments
 (0)