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.

1 Like

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

A post was split to a new topic: How to write message to console log?

Thanks. It works.