Logging problems

Hello!

I’m experiencing some problems with the console logs.
I’m using an external library that used to log with log4j, and I could see all the logs from this library in Katalon.
Now, I moved to slf4j and logback, and I can’t see anything in Katalon console.

Does anyone know if its some config I have to change in katalon? Or could it be from my library itself?

Thanks in advance!

Katalon Studio uses logback for its own sake to implement its logging system . KS does not allow users to customise the logback configuration for their use. See my previous research.

You had better abandon the idea of using slf4j and logback in KS.
Log4j would suffice for you, wouldn’t it?

1 Like

Hi again!
Thanks for your answer.

First of all, sadly I need to use slfj4 cause this library is used across multiple applications that need slfj4 and nothing more :frowning:

I’ve been reading your post for another issue I have.
I already know changing manually the logback is not the best thing I can do because everytime I execute something this file is created. But I have a necessity to output my console log to a .txt and add import it to a test run in jira not touching the test cases code at all.

.log file created by katalon does not work for me because first, it’s not readable, and second, I just want the logging of each TC separately.
Is it possible to dynamically change the logback file during execution to add a printstream to a file?
That’s the only solution I can find for my problem.

Any suggestions would be really appreciated.

Thanks!!

I know a way to dynamically customise an instance of org.slf4j.LoggerFactory inside Katalon Studio. You can modify it so that it creates an instance of ch.qos.logback.classic.LoggerContext which your code creates by calling LogBack API. You will leave the logback configuration file managed by Katalon Studio untouched.

But you need to write fair amount of custom codes in a Test Case or in a Test Listener.

This constraint makes your wish impossible to achieve.