@@ -70,11 +70,9 @@ def connect(self) -> Any:
70
70
conn_dict ["host" ] = host or server
71
71
72
72
try :
73
- logger .debug (f "Attempting FreeTDS connection with config: { conn_dict } " )
73
+ logger .debug ("Attempting FreeTDS connection" )
74
74
self .connection = pyodbc .connect (** conn_dict )
75
- logger .info (
76
- f"Successfully connected to Sybase using FreeTDS: { conn_dict } "
77
- )
75
+ logger .info ("Successfully connected to Sybase using FreeTDS" )
78
76
return self .connection
79
77
except Exception as e :
80
78
error_msg = f"Failed to connect to Sybase with FreeTDS: { str (e )} "
@@ -149,24 +147,15 @@ def connect(self) -> Any:
149
147
final_config .update (ase_config )
150
148
151
149
try :
152
- logger .debug (
153
- f"Attempting connection with config: { final_config } "
154
- )
150
+ logger .debug ("Attempting connection ..." )
155
151
self .connection = pyodbc .connect (** final_config )
156
152
logger .info (
157
- f"Successfully connected to Sybase using: "
158
- f"driver={ driver } , "
159
- f"{ attempt ['key' ]} ={ attempt ['value' ]} , "
160
- f"port_config={ port_config } , "
161
- f"ase_config={ ase_config } "
153
+ "Successfully connected to Sybase using: "
154
+ f"driver={ driver } "
162
155
)
163
156
return self .connection
164
157
except Exception as e :
165
- error_msg = (
166
- f"Failed with { attempt ['key' ]} ={ attempt ['value' ]} , "
167
- f"port_config={ port_config } , "
168
- f"ase_config={ ase_config } : { str (e )} "
169
- )
158
+ error_msg = "Failed to connect to sybase."
170
159
logger .debug (error_msg )
171
160
errors .append (error_msg )
172
161
continue
0 commit comments