From 93ed73f700e1f6da32418b0188c2a8f8122f1c0d Mon Sep 17 00:00:00 2001 From: Cody Logan Date: Tue, 24 Oct 2023 11:00:56 -0700 Subject: Use per-module loggers and tweak initial log config --- src/wikiget/parse.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/wikiget/parse.py') diff --git a/src/wikiget/parse.py b/src/wikiget/parse.py index fe3fe43..52cc262 100644 --- a/src/wikiget/parse.py +++ b/src/wikiget/parse.py @@ -24,6 +24,8 @@ from wikiget.exceptions import ParseError from wikiget.file import File from wikiget.validations import valid_file +logger = logging.getLogger(__name__) + def get_dest(dl: str, args: Namespace) -> File: url = urlparse(dl) @@ -34,7 +36,7 @@ def get_dest(dl: str, args: Namespace) -> File: if args.site is not wikiget.DEFAULT_SITE: # this will work even if the user specifies 'commons.wikimedia.org' since # we're comparing objects instead of values (is not vs. !=) - logging.warning("Target is a URL, ignoring site specified with --site") + logger.warning("Target is a URL, ignoring site specified with --site") else: filename = dl site_name = args.site -- cgit v1.2.3