update
This commit is contained in:
+4
-4
@@ -1,7 +1,7 @@
|
||||
from enum import Enum
|
||||
|
||||
from core.eventbus import EventPrintLog, event_bus
|
||||
import config
|
||||
from core.ebus.logger_ebus import EventPrintLog, loggerEBus
|
||||
from core.config import config as config
|
||||
|
||||
|
||||
class LogLevel(Enum):
|
||||
@@ -21,6 +21,6 @@ class LogData:
|
||||
|
||||
def PrintLog(level:LogLevel, message:str):
|
||||
data = LogData(level, message)
|
||||
event_bus.publish(EventPrintLog, data)
|
||||
if config.console_log:
|
||||
loggerEBus.publish(EventPrintLog, data)
|
||||
if config.getConsoleLog():
|
||||
print(f'{level.name} {message}')
|
||||
|
||||
Reference in New Issue
Block a user