Skip to content

Commit

Permalink
neo4j: fix logger
Browse files Browse the repository at this point in the history
  • Loading branch information
naisanzaa committed Oct 24, 2023
1 parent e39c3c7 commit 1ab0180
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions automon/integrations/neo4jWrapper/clientAsync.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ def __init__(self,
:param hosts: list
:param encrypted: bool
"""
self._log = Logging(Neo4jAsyncClient.__name__, Logging.DEBUG)

self.config = config or Neo4jConfig(
user=user,
Expand Down Expand Up @@ -61,7 +60,7 @@ def _client(self):
return client

except Exception as e:
self._log.error(f'Cannot connect to neo4j server: {self.config.NEO4J_HOST}, {e}')
log.error(f'Cannot connect to neo4j server: {self.config.NEO4J_HOST}, {e}')

return False

Expand All @@ -79,10 +78,10 @@ def run(self):
try:
while not self.cypher.empty():
cypher = self.cypher.get_nowait()
self._log.debug(f'cypher: {cypher}')
log.debug(f'cypher: {cypher}')
self.session.run(cypher)
return True
except Exception as e:
self._log.error(f'{e}')
log.error(f'{e}')

return False

0 comments on commit 1ab0180

Please sign in to comment.