Skip to content

Commit 987dbf4

Browse files
committed
Use consistent style for passing logger name
This has each module use `__name__` for the path to its own logger. Previously, most modules did this several hard-coded their names in calls to logging.getLogger.
1 parent 307f198 commit 987dbf4

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

Diff for: git/config.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
__all__ = ("GitConfigParser", "SectionConstraint")
6262

6363

64-
log = logging.getLogger("git.config")
64+
log = logging.getLogger(__name__)
6565
log.addHandler(logging.NullHandler())
6666

6767

Diff for: git/objects/commit.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252

5353
# ------------------------------------------------------------------------
5454

55-
log = logging.getLogger("git.objects.commit")
55+
log = logging.getLogger(__name__)
5656
log.addHandler(logging.NullHandler())
5757

5858
__all__ = ("Commit",)

Diff for: git/objects/submodule/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
__all__ = ["Submodule", "UpdateProgress"]
5757

5858

59-
log = logging.getLogger("git.objects.submodule.base")
59+
log = logging.getLogger(__name__)
6060
log.addHandler(logging.NullHandler())
6161

6262

Diff for: git/objects/submodule/root.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
__all__ = ["RootModule", "RootUpdateProgress"]
2424

25-
log = logging.getLogger("git.objects.submodule.root")
25+
log = logging.getLogger(__name__)
2626
log.addHandler(logging.NullHandler())
2727

2828

Diff for: git/remote.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
# -------------------------------------------------------------
6666

6767

68-
log = logging.getLogger("git.remote")
68+
log = logging.getLogger(__name__)
6969
log.addHandler(logging.NullHandler())
7070

7171

0 commit comments

Comments
 (0)