aboutsummaryrefslogtreecommitdiff
path: root/src/wikiget/parse.py
diff options
context:
space:
mode:
authorCody Logan <cody@lokken.dev>2023-10-24 11:00:56 -0700
committerCody Logan <cody@lokken.dev>2023-10-24 11:04:54 -0700
commit93ed73f700e1f6da32418b0188c2a8f8122f1c0d (patch)
tree6a179b38aee4fc6ebc41294fedc2d1f91b4fb0d8 /src/wikiget/parse.py
parent0b700624f79461a0d9f52eeb0370d15f16d49c90 (diff)
downloadwikiget-93ed73f700e1f6da32418b0188c2a8f8122f1c0d.tar.gz
wikiget-93ed73f700e1f6da32418b0188c2a8f8122f1c0d.zip
Use per-module loggers and tweak initial log config
Diffstat (limited to 'src/wikiget/parse.py')
-rw-r--r--src/wikiget/parse.py4
1 files changed, 3 insertions, 1 deletions
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