Skip to content
Snippets Groups Projects

Allow setting up logging level in core loader

1 file
+ 4
0
Compare changes
  • Side-by-side
  • Inline
  • cd0333ae
    This will allow bumping the verbosity level when debugging some loaders. And actually
    lowering the current verbosity on existing loaders (e.g. cvs one) without losing the
    possibility to be more verbose in debugging mode.
+ 4
0
@@ -87,6 +87,7 @@ class BaseLoader:
lister_name: Optional[str] = None,
lister_instance_name: Optional[str] = None,
metadata_fetcher_credentials: CredentialsType = None,
**kwargs,
):
if lister_name == "":
raise ValueError("lister_name must not be the empty string")
@@ -116,6 +117,9 @@ class BaseLoader:
_log = logging.getLogger("requests.packages.urllib3.connectionpool")
_log.setLevel(logging.WARN)
self.log.setLevel(
logging.DEBUG if kwargs.get("debug") is True else logging.INFO
)
# possibly overridden in self.prepare method
self.visit_date = datetime.datetime.now(tz=datetime.timezone.utc)
Loading