@@ -113,7 +113,6 @@ def __init__(
113113 name. To resolve a DNS record to an instance connection name, use
114114 DnsResolver.
115115 Default: DefaultResolver
116-
117116 """
118117 # if refresh_strategy is str, convert to RefreshStrategy enum
119118 if isinstance (refresh_strategy , str ):
@@ -283,8 +282,7 @@ async def connect_async(
283282 conn_name = await self ._resolver .resolve (instance_connection_string )
284283 if self ._refresh_strategy == RefreshStrategy .LAZY :
285284 logger .debug (
286- f"['{ instance_connection_string } ']: Refresh strategy is set"
287- " to lazy refresh"
285+ f"['{ conn_name } ']: Refresh strategy is set to lazy refresh"
288286 )
289287 cache = LazyRefreshCache (
290288 conn_name ,
@@ -294,18 +292,15 @@ async def connect_async(
294292 )
295293 else :
296294 logger .debug (
297- f"['{ instance_connection_string } ']: Refresh strategy is set"
298- " to backgound refresh"
295+ f"['{ conn_name } ']: Refresh strategy is set to backgound refresh"
299296 )
300297 cache = RefreshAheadCache (
301298 conn_name ,
302299 self ._client ,
303300 self ._keys ,
304301 enable_iam_auth ,
305302 )
306- logger .debug (
307- f"['{ instance_connection_string } ']: Connection info added to cache"
308- )
303+ logger .debug (f"['{ conn_name } ']: Connection info added to cache" )
309304 self ._cache [(instance_connection_string , enable_iam_auth )] = cache
310305
311306 connect_func = {
@@ -344,9 +339,7 @@ async def connect_async(
344339 # the cache and re-raise the error
345340 await self ._remove_cached (instance_connection_string , enable_iam_auth )
346341 raise
347- logger .debug (
348- f"['{ instance_connection_string } ']: Connecting to { ip_address } :3307"
349- )
342+ logger .debug (f"['{ conn_info .conn_name } ']: Connecting to { ip_address } :3307" )
350343 # format `user` param for automatic IAM database authn
351344 if enable_iam_auth :
352345 formatted_user = format_database_user (
0 commit comments