Skip to content

Commit

Permalink
Use consistent style for passing logger name
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
EliahKagan committed Jan 26, 2024
1 parent 307f198 commit 987dbf4
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion git/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
__all__ = ("GitConfigParser", "SectionConstraint")


log = logging.getLogger("git.config")
log = logging.getLogger(__name__)
log.addHandler(logging.NullHandler())


Expand Down
2 changes: 1 addition & 1 deletion git/objects/commit.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

# ------------------------------------------------------------------------

log = logging.getLogger("git.objects.commit")
log = logging.getLogger(__name__)
log.addHandler(logging.NullHandler())

__all__ = ("Commit",)
Expand Down
2 changes: 1 addition & 1 deletion git/objects/submodule/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
__all__ = ["Submodule", "UpdateProgress"]


log = logging.getLogger("git.objects.submodule.base")
log = logging.getLogger(__name__)
log.addHandler(logging.NullHandler())


Expand Down
2 changes: 1 addition & 1 deletion git/objects/submodule/root.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

__all__ = ["RootModule", "RootUpdateProgress"]

log = logging.getLogger("git.objects.submodule.root")
log = logging.getLogger(__name__)
log.addHandler(logging.NullHandler())


Expand Down
2 changes: 1 addition & 1 deletion git/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
# -------------------------------------------------------------


log = logging.getLogger("git.remote")
log = logging.getLogger(__name__)
log.addHandler(logging.NullHandler())


Expand Down

0 comments on commit 987dbf4

Please sign in to comment.