diff --git a/src/sh_edraft/logging/logger.py b/src/sh_edraft/logging/logger.py index 51137ce0..01b58937 100644 --- a/src/sh_edraft/logging/logger.py +++ b/src/sh_edraft/logging/logger.py @@ -146,9 +146,9 @@ class Logger(LoggerBase): if ex is not None: tb = traceback.format_exc() self.error(name, message) - output = self._get_string(name, LoggingLevel.ERROR, f'{ex} -> {tb}') + output = self._get_string(name, LoggingLevel.FATAL, f'{ex} -> {tb}') else: - output = self._get_string(name, LoggingLevel.ERROR, message) + output = self._get_string(name, LoggingLevel.FATAL, message) # check if message can be written to log if self._level.value >= LoggingLevel.FATAL.value: diff --git a/src/tests/logging/logger.py b/src/tests/logging/logger.py index 1fb3d3a7..8187ec85 100644 --- a/src/tests/logging/logger.py +++ b/src/tests/logging/logger.py @@ -210,4 +210,4 @@ class LoggerTest(unittest.TestCase): print('Cannot open log file', e) self.assertGreater(len(log_content), 0) - self.assertTrue(log_content[len(log_content) - 1].endswith(f'[ ERROR ] [ {__name__} ]: {__name__}.test_fatal:\n')) + self.assertTrue(log_content[len(log_content) - 1].endswith(f'[ FATAL ] [ {__name__} ]: {__name__}.test_fatal:\n'))