How can I integrate logger in Katelon Studio?

I want to integrate services like log4j, like if am writing some log messages in my tests cases ex:“”), log.error(“”), etc. these log messages should get printed in a log file which I can refer for failure test cases after executed.

I want to customize my log file like we do it in java api log4j, Log4j – Apache Log4j 2

After lots of RND found a way to use logger with Katelon Studio, first we have to create config file such as .properties file with all logger configuration

# Root logger option
log4j.rootLogger=INFO, file
# Direct log messages to a log file
log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:(%F:%L) - %m%n

and then after setting path of config file as

PropertyConfigurator.configure("path of .properties file")

we can use logger services with all log levels


Upvoted: Good work, Aman!

It would be fabulous if you could fully document the steps you took and post this a proper TIP document in

The best approach to take is to pretend you’re talking to yourself, six months ago and recall you knew nothing about using log4j or how to incorporate it in Katalon.

If you do this, I’m sure many people – including me – will appreciate it.

nice aman, +1

Hello All,

Someone can inform, how can i generate log files on local for my test?

good morning… this link seems broken… can you forward us the new tips and tricks url.?
Thanks in Advanced

hi Aman,
I tried adding the above details in file. After taht where do we need to configure? Could you please provide the steps.