Fixed _append_log & create logic in logger_service

This commit is contained in:
2022-10-06 16:45:20 +02:00
parent cc3b1afaa1
commit 3b55b3d5a5
16 changed files with 32 additions and 32 deletions

View File

@@ -15,7 +15,7 @@ __title__ = 'cpl_core.logging'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
__version__ = '2022.10.0.post4'
__version__ = '2022.10.0.post5'
from collections import namedtuple
@@ -28,4 +28,4 @@ from .logging_settings import LoggingSettings
from .logging_settings_name_enum import LoggingSettingsNameEnum
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
version_info = VersionInfo(major='2022', minor='10', micro='0.post4')
version_info = VersionInfo(major='2022', minor='10', micro='0.post5')

View File

@@ -263,9 +263,9 @@ class Logger(LoggerABC):
Error message
"""
# check if message can be shown in console
if self._console.value >= LoggingLevelEnum.FATAL.value:
Console.set_foreground_color(ForegroundColorEnum.red)
Console.write_line(self._get_string(name, LoggingLevelEnum.ERROR, message))
if self._console.value >= LoggingLevelEnum.WARN.value:
Console.set_foreground_color(ForegroundColorEnum.yellow)
Console.write_line(self._get_string(name, LoggingLevelEnum.WARN, message))
Console.set_foreground_color(ForegroundColorEnum.default)
sys.exit()