# Cleaning up output from Console

**URL:** <https://forum.katalon.com/t/cleaning-up-output-from-console/43210>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [May 7, 2020, 9:54pm UTC](https://forum.katalon.com/t/cleaning-up-output-from-console/43210 "2020-05-07T21:54:05Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [May 7, 2020, 9:55pm UTC](https://forum.katalon.com/t/cleaning-up-output-from-console/43210/2 "2020-05-07T21:55:37Z")

</div>

> 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](https://github.com/katalon-studio/katalon-studio-testing-framework/blob/master/Include/scripts/groovy/com/kms/katalon/core/util/KeywordUtil.java) calls [com.kms.katalon.core.logging.KeywordLogger](https://github.com/katalon-studio/katalon-studio-testing-framework/blob/master/Include/scripts/groovy/com/kms/katalon/core/logging/KeywordLogger.java), 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](http://logback.qos.ch/) 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.

> [@How can I change the message format of WebUI.comment("msg")? + logging into FILE](http://forum.katalon.com/t/how-can-i-change-the-message-format-of-webui-comment-msg-logging-into-file/17559):
>
> I am using Katalon Studio 5.10.1 on Windows 7 Problem to solve When I run this test case: import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI def arg0 = 2 def arg1 = 3 def result = arg0 + arg1 WebUI.comment("arg0 + arg1 = ${result}") I get the following output in the Console: 2019-01-11 11:28:35.018 INFO c.k.katalon.core.main.TestCaseExecutor - -------------------- 2019-01-11 11:28:35.034 INFO c.k.katalon.core.main.TestCaseExecutor - START Test Cases/AdditionDemo 201…

> [@Write the sl4J logs into a text file](http://forum.katalon.com/t/write-the-sl4j-logs-into-a-text-file/23332/3):
>
> Katalon Studio uses the [logback](https://logback.qos.ch/index.html) as the implementation of the slf4j interface. Some articles on the web explains how to use SLF4J and Logback. For example, please refer to: Once I have ever tried to change the logback configuration in Katalon Studio. See the following post:. In this post, I tried to change the format of log messages by modifying the logback configuration. Similarly you can add new appender which writes message into file by modifying the logback configuration. Here I just men…

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…

---

_[View the full topic](https://forum.katalon.com/t/cleaning-up-output-from-console/43210)._
