Skip to content

Conversation

@gargsaumya
Copy link
Contributor

This pull request updates the logging mechanism in the ConnectionPool::acquire method to improve error reporting when disconnecting bad or expired connections.

Copilot AI review requested due to automatic review settings June 2, 2025 09:18
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the logging mechanism in the ConnectionPool::acquire method by replacing std::cout with the LOG function for more consistent error reporting.

  • Replaces std::cout with LOG for error logging when disconnecting bad/expired connections.
  • Adjusts the error message to better reflect the context of a connection failure.
Comments suppressed due to low confidence (1)

mssql_python/pybind/connection/connection_pool.cpp:69

  • [nitpick] Consider aligning the error message with the previous version by explicitly indicating 'disconnect() failed' or including the method name if it aids in faster debugging.
LOG("Disconnect bad/expired connections failed: ", ex.what());

Copy link
Collaborator

@bewithgaurav bewithgaurav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, please rename the PR to start from FIX:

@gargsaumya gargsaumya changed the title minor cleanup : adding LOG statement instead of print FIX: minor cleanup, adding LOG statement instead of print Jun 2, 2025
@gargsaumya gargsaumya merged commit 8b38d93 into main Jun 2, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants