diff options
| author | Cody Logan <cody@lokken.dev> | 2023-10-24 11:00:56 -0700 |
|---|---|---|
| committer | Cody Logan <cody@lokken.dev> | 2023-10-24 11:04:54 -0700 |
| commit | 93ed73f700e1f6da32418b0188c2a8f8122f1c0d (patch) | |
| tree | 6a179b38aee4fc6ebc41294fedc2d1f91b4fb0d8 /src/wikiget/parse.py | |
| parent | 0b700624f79461a0d9f52eeb0370d15f16d49c90 (diff) | |
| download | wikiget-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.py | 4 |
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 |
