Skip to content

Commit a6b5214

Browse files
authored
Merge pull request #318 from datachecks/fix/logger-info
fix: logger info fix
2 parents 3d45192 + f1a2133 commit a6b5214

File tree

1 file changed

+6
-17
lines changed

1 file changed

+6
-17
lines changed

dcs_core/integrations/databases/sybase.py

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,9 @@ def connect(self) -> Any:
7070
conn_dict["host"] = host or server
7171

7272
try:
73-
logger.debug(f"Attempting FreeTDS connection with config: {conn_dict}")
73+
logger.debug("Attempting FreeTDS connection")
7474
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")
7876
return self.connection
7977
except Exception as e:
8078
error_msg = f"Failed to connect to Sybase with FreeTDS: {str(e)}"
@@ -149,24 +147,15 @@ def connect(self) -> Any:
149147
final_config.update(ase_config)
150148

151149
try:
152-
logger.debug(
153-
f"Attempting connection with config: {final_config}"
154-
)
150+
logger.debug("Attempting connection ...")
155151
self.connection = pyodbc.connect(**final_config)
156152
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}"
162155
)
163156
return self.connection
164157
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."
170159
logger.debug(error_msg)
171160
errors.append(error_msg)
172161
continue

0 commit comments

Comments
 (0)