mirror of
https://github.com/SantaSpeen/CLI-in-Python.git
synced 2025-07-01 15:25:31 +00:00
Fix for logging
This commit is contained in:
parent
8cd4e59918
commit
39f55c1b37
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Developed by Ahegao Devs
|
# Developed by Ahegao Devs
|
||||||
# Written by: SantaSpeen
|
# Written by: SantaSpeen
|
||||||
# Version 2.0
|
# Version 2.1
|
||||||
# Licence: MIT
|
# Licence: MIT
|
||||||
# (c) ahegao.su 2022
|
# (c) ahegao.su 2022
|
||||||
|
|
||||||
@ -215,7 +215,10 @@ class Console:
|
|||||||
def emit(cls, record):
|
def emit(cls, record):
|
||||||
try:
|
try:
|
||||||
msg = cls.format(record)
|
msg = cls.format(record)
|
||||||
|
if cls.stream.name == "<stderr>":
|
||||||
ConsoleIO.write(self.__create_message(msg))
|
ConsoleIO.write(self.__create_message(msg))
|
||||||
|
else:
|
||||||
|
cls.stream.write(msg + cls.terminator)
|
||||||
cls.flush()
|
cls.flush()
|
||||||
except RecursionError:
|
except RecursionError:
|
||||||
raise
|
raise
|
||||||
|
Loading…
x
Reference in New Issue
Block a user