Skip to content

Commit 11ef3e2

Browse files
committed
Improve output of warning
Now used logger from mkdocs and references the plugin
1 parent 03e87fe commit 11ef3e2

File tree

1 file changed

+3
-2
lines changed
  • mkdocs_git_authors_plugin/git

1 file changed

+3
-2
lines changed

mkdocs_git_authors_plugin/git/page.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from .repo import Repo, AbstractRepoObject
55
from .command import GitCommand, GitCommandError
66

7+
logger = logging.getLogger("mkdocs.plugins")
78

89
class Page(AbstractRepoObject):
910
"""
@@ -30,8 +31,8 @@ def __init__(self, repo: Repo, path: Path):
3031
try:
3132
self._process_git_blame()
3233
except GitCommandError:
33-
logging.warning(
34-
"%s has not been committed yet. Lines are not counted" % path
34+
logger.warning(
35+
"[git-authors-plugin] %s has not been committed yet. Lines are not counted" % path
3536
)
3637

3738
def add_total_lines(self, cnt: int = 1):

0 commit comments

Comments
 (0)