Closed Niall7459 closed 5 years ago
Similar to #137
Well, logging frameworks like slf4j usually are highly configurable, so it should be possible to disable the console loggers and let logging lines go to a log file.
If you really need to see the lines on console, then it is common to have Ctrl-L refresh the screen: users will see the scrambled screen as in your screenshot, and they can then do a manual refresh to see the output of your tool again.
The Screen layer uses a buffer to remember what was written earlier, which is why when you write directly to the underlying terminal things get weird. You could attach a custom appender to the logging backend that initiates a full refresh after something was written to the logger, but turning off logging or logging to standard error and redirecting it to a file is probably your best options.
That's probably what I will do. Mainly a question on if Lanterna had this feature built in or not, I will close this. Regards
I expected this. As the logger logs it breaks the text. I refresh the table every second using Screen#refresh() is not an option (low-bandwith systems and delay whilst re drawing)
I'm using SLF4J. Preferably need to be able to do something on runtime to fix this. Possibly disabling the loggers. Any ideas?
Regards.