Skip to content
This repository was archived by the owner on Jan 18, 2023. It is now read-only.

Commit 50143b3

Browse files
committed
Update logging
1 parent f8e6274 commit 50143b3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

firststreet/http_util.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
import asyncio
66

77
# External Imports
8+
import logging
9+
810
import aiohttp
911

1012
# Internal Imports
@@ -102,15 +104,15 @@ async def execute(self, endpoint, session):
102104
return body
103105

104106
except asyncio.TimeoutError:
105-
print("Timeout error for fsid: {} at {}. Retry {}".format(endpoint[1], endpoint[0], retry))
107+
logging.info("Timeout error for fsid: {} at {}. Retry {}".format(endpoint[1], endpoint[0], retry))
106108
retry += 1
107109
await asyncio.sleep(1)
108110

109111
except aiohttp.ClientError as ex:
110-
print("{} error while getting fsid: {} from {}".format(ex.__class__, endpoint[1], endpoint[0]))
112+
logging.error("{} error while getting fsid: {} from {}".format(ex.__class__, endpoint[1], endpoint[0]))
111113
return {'fsid': endpoint[1]}
112114

113-
print("Timeout error after 5 retries for fsid: {} from {}".format(endpoint[1], endpoint[0]))
115+
logging.error("Timeout error after 5 retries for fsid: {} from {}".format(endpoint[1], endpoint[0]))
114116
return {'fsid': endpoint[1]}
115117

116118
@staticmethod

0 commit comments

Comments
 (0)