Skip to content

Commit

Permalink
Merge pull request #16 from erunks/add-refined-logs
Browse files Browse the repository at this point in the history
Add more robust logging
  • Loading branch information
erunks authored Jan 10, 2021
2 parents f7a6742 + a7727fe commit 270bb2c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
pip
MechanicalSoup
mysql.connector
pingparsing
Expand Down
4 changes: 4 additions & 0 deletions src/DatabaseInteractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ def execute_sql_and_get_results(self, sql, values = None):

except:
self.logger.exception(f'Unexpected error: {exc_info()[0]}')
self.logger.info(f'SQL to execute: {sql}')
self.logger.indo(f'Values: {values}')

def execute_sql_with_commit(self, sql, values = None):
try:
Expand All @@ -70,3 +72,5 @@ def execute_sql_with_commit(self, sql, values = None):

except:
self.logger.exception(f'Unexpected error: {exc_info()[0]}')
self.logger.info(f'SQL to execute: {sql}')
self.logger.indo(f'Values: {values}')

0 comments on commit 270bb2c

Please sign in to comment.