What is best practice for writing to console/log

Hello,

What is the best practice and recommended way of writing info to Katalon studio console and execution log?

I have used this method(src) :

KeywordLogger log = new KeywordLogger()
log.logInfo(“yourMsg”)

But I got notification saying that it should no longer be used and sometimes test cases fail if I have this in my scripts.

Best regards
Ismar

For INFO level messages, you can use KeywordUtil.logInfo(String message).
There are also other methods in this class, such as markWarning, markFailed and markError.

Awesome, thank you. This way of logging info works without a problem

Thanks. It works.