Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit987dbf4

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 incalls to logging.getLogger.
1 parent307f198 commit987dbf4

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)

[8]ページ先頭

©2009-2025 Movatter.jp