-
Notifications
You must be signed in to change notification settings - Fork 8
removed useless debug logging #1133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -36,7 +36,6 @@ def create_dsn(self, params: dict): | |||||||||||||||||
| return params | ||||||||||||||||||
|
|
||||||||||||||||||
| async def connect(self): | ||||||||||||||||||
| self._logger.debug(f"Memcache: Connecting to {self._params}") | ||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion: Removed debug logging for Memcache connection The debug logging for the Memcache connection has been removed. If this was useful for debugging purposes, consider adding a conditional debug flag to enable it when needed.
Suggested change
|
||||||||||||||||||
| try: | ||||||||||||||||||
| self._pool = aiomcache.Client(pool_size=self._max_queries, **self._params) | ||||||||||||||||||
|
|
||||||||||||||||||
|
|
@@ -116,7 +115,6 @@ async def connection(self): | |||||||||||||||||
| """ | ||||||||||||||||||
| __init async Memcache initialization | ||||||||||||||||||
| """ | ||||||||||||||||||
| self._logger.debug(f"Memcache: Connecting to {self._params}") | ||||||||||||||||||
| try: | ||||||||||||||||||
| self._connection = aiomcache.Client(**self._params) | ||||||||||||||||||
| except aiomcache.exceptions.ValidationException as err: | ||||||||||||||||||
|
|
||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -224,7 +224,7 @@ async def connect(self): | |||||||||||||||||
| """ | ||||||||||||||||||
| Creates a Pool Connection. | ||||||||||||||||||
| """ | ||||||||||||||||||
| self._logger.debug(f"AsyncPg (Pool): Connecting to {self._dsn}") | ||||||||||||||||||
| # self._logger.debug(f"AsyncPg (Pool): Connecting to {self._dsn}") | ||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion: Commented out debug logging The debug logging for the connection has been commented out. If this is intentional for production, consider adding a conditional debug flag to enable it when needed.
Suggested change
|
||||||||||||||||||
| try: | ||||||||||||||||||
| # TODO: pass a setup class for set_builtin_type_codec and a setup for add listener | ||||||||||||||||||
| server_settings = { | ||||||||||||||||||
|
|
@@ -635,14 +635,15 @@ def _uuid_decoder(value): | |||||||||||||||||
| try: | ||||||||||||||||||
| r = await self._connection.execute(config) | ||||||||||||||||||
| except RuntimeError as err: | ||||||||||||||||||
| self._logger.warning(f"Pg: Error on Connection Configuration: {err}") | ||||||||||||||||||
| self._logger.warning( | ||||||||||||||||||
| f"Pg: Error on Connection Configuration: {err}" | ||||||||||||||||||
| ) | ||||||||||||||||||
| if self._init_func is not None and callable(self._init_func): | ||||||||||||||||||
| try: | ||||||||||||||||||
| await self._init_func(self._connection) # pylint: disable=E1102 | ||||||||||||||||||
| except (ValueError, RuntimeError) as err: | ||||||||||||||||||
| self._logger.warning(f"Error on Init Connection: {err}") | ||||||||||||||||||
| self._initialized_on = time.time() | ||||||||||||||||||
| self._logger.debug(f"Initialized on: {self._initialized_on}") | ||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion: Removed debug logging for initialization The debug logging for initialization has been removed. If this was useful for debugging purposes, consider adding a conditional debug flag to enable it when needed.
Suggested change
|
||||||||||||||||||
| return self | ||||||||||||||||||
| except ConnectionRefusedError as err: | ||||||||||||||||||
| raise UninitializedError( | ||||||||||||||||||
|
|
||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -26,7 +26,6 @@ async def connect(self, **kwargs): | |||||||
| """ | ||||||||
| __init async db initialization | ||||||||
| """ | ||||||||
| self._logger.debug(f"Redis Pool: Connecting to {self._dsn}") | ||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion: Removed debug logging for Redis connection The debug logging for the Redis connection has been removed. If this was useful for debugging purposes, consider adding a conditional debug flag to enable it when needed.
Suggested change
|
||||||||
| try: | ||||||||
| self._pool = aioredis.ConnectionPool.from_url( | ||||||||
| self._dsn, | ||||||||
|
|
||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -113,9 +113,6 @@ def __init__( | |||||||||||||||
| self.params["db"] = self.params.get("database", None) | ||||||||||||||||
|
|
||||||||||||||||
| async def connection(self): | ||||||||||||||||
| self._logger.debug( | ||||||||||||||||
| f'RT Connection to host {self.params["host"]}:{self.params["port"]}' | ||||||||||||||||
| ) | ||||||||||||||||
|
Comment on lines
-116
to
-118
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion: Removed debug logging for RethinkDB connection The debug logging for the RethinkDB connection has been removed. If this was useful for monitoring connections, consider adding a conditional debug flag to enable it when needed.
Suggested change
|
||||||||||||||||
| self._connection = None | ||||||||||||||||
| self.params["timeout"] = self._timeout | ||||||||||||||||
| try: | ||||||||||||||||
|
|
||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -89,8 +89,7 @@ async def test_data(driver, params, event_loop): | |
| "user": "troc_pgdata", | ||
| "password": "12345678", | ||
| "org": "navigator", | ||
| "bucket": "navigator", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚨 issue (security): Removed sensitive token The token has been removed from the parameters. Ensure that this change does not affect the functionality of the test and that the token is securely managed elsewhere. |
||
| "token": "qroJLmcrjM-IsDhxz-nR_NIoUxpjAgDz9AuXJJlTnikCIr70CNa_IxXlO5BID4LVrpHHCjzzeSr_UZab5ON_9A==" | ||
| "bucket": "navigator" | ||
| } | ||
| loop.run_until_complete( | ||
| test_connection(DRIVER, params=p, event_loop=loop) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Removed print statement
The print statement for the cluster has been removed. Ensure that this information is logged appropriately if needed for debugging or monitoring.