Closed vikramsubramanian closed 2 months ago
Hi
Is it possible to configure()
your widget and colorize it? You'll probably need to add a handler in charge of creating and colorizing the text.
def add_log_to_gui(self, message):
color = {"INFO": "white", "DEBUG": "grey", "ERROR": "red", "WARNING": "yellow"}
self.widget.insert("end", message)
self.widget.configure(color=color.get(message["level"].name, "white"))
logger.add(add_log_to_gui)
Please, re-open the issue if my answer did not solve your issue.
Loguru's color logging is very pretty. Can I use it in the GUI to display colored info? I tried to "redirect" the stdout to a Text control and it (of course) does not display colors. What can I do? (sorry this is not an issue, and sorry for my bad English)