diff options
| author | Jordan Cook <jordan.cook@pioneer.com> | 2021-04-10 19:44:31 -0500 |
|---|---|---|
| committer | Jordan Cook <jordan.cook@pioneer.com> | 2021-04-10 19:44:31 -0500 |
| commit | 7dfb7c0e3c0584c570eb192ffc14361ac36de8fa (patch) | |
| tree | 9d970db92e8a7001f351985ddc9591443879fb93 /requests_cache/session.py | |
| parent | 82076f063b66099df0ed24a260041b921656fb37 (diff) | |
| download | requests-cache-7dfb7c0e3c0584c570eb192ffc14361ac36de8fa.tar.gz | |
Demote most logging.info statements to debug
Diffstat (limited to 'requests_cache/session.py')
| -rw-r--r-- | requests_cache/session.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/requests_cache/session.py b/requests_cache/session.py index e9ee2fe..24a48b1 100644 --- a/requests_cache/session.py +++ b/requests_cache/session.py @@ -99,7 +99,7 @@ class CacheMixin: # If the request has been filtered out, delete previously cached response if it exists cache_key = self.cache.create_key(response.request, **kwargs) if not response.from_cache and not self.filter_fn(response): - logger.info(f'Deleting filtered response for URL: {response.url}') + logger.debug(f'Deleting filtered response for URL: {response.url}') self.cache.delete(cache_key) return response @@ -112,7 +112,7 @@ class CacheMixin: """Send a prepared request, with caching.""" # If we shouldn't cache the response, just send the request if not self._is_cacheable(request): - logger.info(f'Request for URL {request.url} is not cacheable') + logger.debug(f'Request for URL {request.url} is not cacheable') response = super().send(request, **kwargs) return set_response_defaults(response) @@ -140,7 +140,7 @@ class CacheMixin: def _handle_expired_response(self, request, response, cache_key, **kwargs) -> AnyResponse: """Determine what to do with an expired response, depending on old_data_on_error setting""" # Attempt to send the request and cache the new response - logger.info('Expired response; attempting to re-send request') + logger.debug('Expired response; attempting to re-send request') try: return self._send_and_cache(request, cache_key, **kwargs) # Return the expired/invalid response on error, if specified; otherwise reraise @@ -153,7 +153,7 @@ class CacheMixin: raise def _send_and_cache(self, request, cache_key, **kwargs): - logger.info(f'Sending request and caching response for URL: {request.url}') + logger.debug(f'Sending request and caching response for URL: {request.url}') response = super().send(request, **kwargs) if response.status_code in self.allowable_codes: self.cache.save_response(cache_key, response, self._get_expiration(request.url)) |
