Reducing log level for the LogViewer

I’m running a test that does a lot of item price comparisons. Once the test is complete it leaves behind which items did not match, I then clean the XML log and send that to those that need it as a report for them in order to fix those discrepancies.

So I end up sending this for example:

2 Likes

I found the spot where to change this. Within the Katalon Studio installation folder… configuration\org.eclipse.osg\65\0\.cp\resources\logback\logback.xml

The logback.xml file holds all of the various levels for the XML logs! Mission complete :smile:

4 Likes

Nice catch!

Looks like any logger listed there can be overridden in the log.properties file.

e.g, default level for com.kms.katalon.core.util.KeywordUtil is trace which will show such message in console:

DEBUG com.kms.katalon.core.util.KeywordUtil ✓ Valid schema

Same for DEBUG level. But with INFO level the above message is suppressed.

So … we can play also at the project level!

log viewer is fine for me. but using those findings to reduce console noise is worth it :slight_smile:

i have to find a way to get rid of the colors and escape codes too … are realy anoying if one may want to copy-paste a log

upvote to this, please

2 Likes

Manually editting configuration\org.eclipse.osg\65\0.cp\resources\logback\logback.xml is not a good idea.

Please have a look at this:

For those who can’t find the logack.xml in said location, just search for logback in the org.eclipse.osg directory, For me it is named logback-console.xml

Read through the replies here and it looks like we can modify the logging behavior by modifying logs.properties. Do I have this correct? If so, what do i add to log.properties file to only log errors? Thanks for your help.

logging.level.com.kms=ERROR should do this, but I tried this and log files are still a mess with a lot of unwanted warning messages… :frowning:

In KS 7.0, you can hide test steps logs.

1 Like

how come I don’t see the enable/disable option for the Log executed test steps in my 7.0.2 ?

@JOE_F I guess it is issue with the MAC release. Windows seems to fine.

it’s not working in KS 7.0.2 on my Mac

Hello @JOE_F

This feature belongs to Katalon Studio Enterprise version. You can only see it if your Katalon account is registered with a business email.

Jass

Thanks, @kazurayam the keyword you provide [ com.kazurayam.ksbackyard.CustomLoggerFactory ]) working fine for me to show in the console but I want to show in the same way to report section as well. can you please help me out in this because of an extra line of code is printing in the report.

For those who are not aware of com.kazurayam.ksbackyard.CustomLoggerFactory, please refer to

Do you want to customize the report generated by the Basic Report plugin?

No, I can not do anything for it. As far as I know, the Basic Report is not customizable at all.

What we can use for ERROR , FATAL , WARN?
logging.level.testcase=ERROR
Is it the above one will work or not.

Please do not ask me.

Google will tell you many articles to read about “What is Log Level”. For example

Like we are using :- Include->Config->log.properties
1.logging.level.com.kms=TRACE
2. logging.level.testcase=INFO
3. logging.level.com.mycompany=DEBUG

What we can use for only ERROR or WARN log-level.