summaryrefslogtreecommitdiff
path: root/Biz
diff options
context:
space:
mode:
Diffstat (limited to 'Biz')
-rwxr-xr-xBiz/Dragons/main.py14
-rwxr-xr-xBiz/Que/Client.py3
2 files changed, 10 insertions, 7 deletions
diff --git a/Biz/Dragons/main.py b/Biz/Dragons/main.py
index 0cb4554..5e7a1c8 100755
--- a/Biz/Dragons/main.py
+++ b/Biz/Dragons/main.py
@@ -12,6 +12,8 @@ import subprocess
import sys
import typing
+LOG = logging.getLogger(__name__)
+
def find_user(line: str) -> typing.Any:
"""
@@ -154,7 +156,7 @@ class Repo:
.split()
if not any(i in p for i in ignored_paths)
]
- logging.debug("collecting stats")
+ LOG.debug("collecting stats")
self.stats = {}
for path in self.paths:
self.stats[path] = authors_for(path, active_users)
@@ -171,9 +173,9 @@ class Repo:
self.stale = {}
max_staleness = 180
for path in self.stats:
- _staleness = staleness(path, now)
- if _staleness > max_staleness:
- self.stale[path] = _staleness
+ staleness_ = staleness(path, now)
+ if staleness_ > max_staleness:
+ self.stale[path] = staleness_
def print_blackholes(self: "Repo", *, full: bool) -> None:
"""Print number of blackholes, or list of all blackholes."""
@@ -232,9 +234,9 @@ def main() -> None:
if args.test:
sys.stdout.write("ok")
sys.exit()
- logging.basicConfig(stream=sys.stderr, level=args.verbosity.upper())
- logging.debug("starting")
+ logging.basicConfig(stream=sys.stderr, level=args.verbosity.upper())
+ LOG.debug("starting")
os.chdir(pathlib.Path(args.repo).resolve())
guard_git(args.repo)
diff --git a/Biz/Que/Client.py b/Biz/Que/Client.py
index 6248a79..4070cdd 100755
--- a/Biz/Que/Client.py
+++ b/Biz/Que/Client.py
@@ -23,11 +23,12 @@ DELAY = 3
BACKOFF = 1
LOGLEVEL = logging.ERROR
-LOG = logging.basicConfig(
+logging.basicConfig(
format="%(asctime)s: %(levelname)s: %(message)s",
level=LOGLEVEL,
datefmt="%Y.%m.%d..%H.%M.%S",
)
+LOG = logging.getLogger(__name__)
def auth(args: argparse.Namespace) -> str | None: