Skip to content

Commit 3653bb5

Browse files
authored
Merge pull request #25 from itolosa/patch-1
Fix using root logger
2 parents 4193ace + 21d581e commit 3653bb5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

gql/client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
from .transport.local_schema import LocalSchemaTransport
77

8+
log = logging.getLogger(__name__)
89

910
class RetryError(Exception):
1011
"""Custom exception thrown when retry logic fails"""
@@ -65,7 +66,7 @@ def _get_result(self, document, *args, **kwargs):
6566
return result
6667
except Exception as e:
6768
last_exception = e
68-
logging.warn("Request failed with exception %s. Retrying for the %s time...",
69+
log.warn("Request failed with exception %s. Retrying for the %s time...",
6970
e, retries_count + 1, exc_info=True)
7071
finally:
7172
retries_count += 1

0 commit comments

Comments
 (0)