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

git/config.py

Lines changed: 1 addition & 1 deletion
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

git/objects/commit.py

Lines changed: 1 addition & 1 deletion
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",)

git/objects/submodule/base.py

Lines changed: 1 addition & 1 deletion
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

git/objects/submodule/root.py

Lines changed: 1 addition & 1 deletion
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

git/remote.py

Lines changed: 1 addition & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy