Skip to content

Commit

Permalink
Ref #177 - Moved some logs from CRITICAL to ERROR level.
Browse files Browse the repository at this point in the history
  • Loading branch information
mxsasha committed Feb 1, 2019
1 parent 135a39b commit 7f76d5d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions irrd/mirroring/mirror_runners_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ def run(self) -> None:

self.database_handler.commit()
except Exception as exc:
logger.critical(f'An exception occurred while attempting to run an export '
f'for {self.source}: {exc}', exc_info=exc)
logger.error(f'An exception occurred while attempting to run an export '
f'for {self.source}: {exc}', exc_info=exc)
finally:
self.database_handler.close()

Expand Down
4 changes: 2 additions & 2 deletions irrd/mirroring/mirror_runners_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ def run(self) -> None:

self.database_handler.commit()
except Exception as exc:
logger.critical(f'An exception occurred while attempting a mirror update or initial import '
f'for {self.source}: {exc}', exc_info=exc)
logger.error(f'An exception occurred while attempting a mirror update or initial import '
f'for {self.source}: {exc}', exc_info=exc)
finally:
self.database_handler.close()

Expand Down
4 changes: 2 additions & 2 deletions irrd/mirroring/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ def parse_object(self, rpsl_text: str) -> None:
return

if obj.source() != self.source:
msg = f'Invalid source {obj.source()} for object {obj.pk()}, expected {self.source}'
logger.critical(msg)
msg = f'Invalid source {obj.source()} for object {obj.pk()}, expected {self.source}. '
logger.critical(msg + 'This object is ignored, causing potential data inconsistencies.')
self.database_handler.record_mirror_error(self.source, msg)
self.obj_errors += 1
return
Expand Down
4 changes: 2 additions & 2 deletions irrd/server/whois/query_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def handle_query(self, query: str) -> WhoisQueryResponse:
result=str(exc)
)
except Exception as exc:
logger.critical(f'An exception occurred while processing whois query "{query}": {exc}', exc_info=exc)
logger.error(f'An exception occurred while processing whois query "{query}": {exc}', exc_info=exc)
return WhoisQueryResponse(
response_type=WhoisQueryResponseType.ERROR,
mode=WhoisQueryResponseMode.IRRD,
Expand All @@ -92,7 +92,7 @@ def handle_query(self, query: str) -> WhoisQueryResponse:
result=str(exc)
)
except Exception as exc:
logger.critical(f'An exception occurred while processing whois query "{query}": {exc}', exc_info=exc)
logger.error(f'An exception occurred while processing whois query "{query}": {exc}', exc_info=exc)
return WhoisQueryResponse(
response_type=WhoisQueryResponseType.ERROR,
mode=WhoisQueryResponseMode.RIPE,
Expand Down
4 changes: 2 additions & 2 deletions irrd/storage/database_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def commit(self) -> None:
self._start_transaction()
except Exception as exc: # pragma: no cover
self._transaction.rollback()
logger.critical('Exception occurred while committing changes, rolling back', exc_info=exc)
logger.error('Exception occurred while committing changes, rolling back', exc_info=exc)
raise

def rollback(self) -> None:
Expand Down Expand Up @@ -204,7 +204,7 @@ def _flush_rpsl_object_upsert_cache(self) -> None:
self._connection.execute(update_stmt)
except Exception as exc: # pragma: no cover
self._transaction.rollback()
logger.critical(f'Exception occurred while executing statement: {update_stmt}, rolling back', exc_info=exc)
logger.error(f'Exception occurred while executing statement: {update_stmt}, rolling back', exc_info=exc)
raise

for obj, forced_serial in self._rpsl_upsert_cache:
Expand Down

0 comments on commit 7f76d5d

Please sign in to comment.