Cleaning up output from Console

  1. Can we control if println appears on the Log Viewer,

No, I don’t think it is possible.

or is that locked to com.kms methods like KeyWordUtil only?

Yes, almost.

What determines if something gets displayed on the Log Viewer?

com.kms.katalon.core.util.KeywordUtil calls com.kms.katalon.core.logging.KeywordLogger, where you can find ultimately org.slf4j.Logger is used.The LogViewer in the KS GUI seems displaying the logs recorded through the SLF4J logging infrastructure. Therefore, any output through System.out.println does not come up to the LogViewer. I believe KS uses the Logback as an implementation backing the SLF4J interface.

  1. I find that the Console cuts off after a certain number of lines. Can we view the entirety of Console Logs, or at least view the log file in our filesystem?

Please have a look at my previous posts.

There is a way for you. You can write a Custom Keyword that modifies the LogBack configuration dynamically. If you do it, you can customize the logging behavior of KS runtime.

It is a hard practice, easily broken, difficult to keep stable. I suppose that Katalon Team is reluctant to offer a feature of customizing LogBack configuration due to the same reason. If a less-skillful user break the logging feature in KS, he/she can not debug it at all because no log is visible.

As far as I see, KS is a product oriented for beginners and novices, not for programming experts. So I would not stick to the customization offering too much. If I personally want to, I can make it anyway…

1 Like