Ask a Question

Is there's a way to write log output to the txt file in Groovy Script test step?

SOLVED
Bishal
Contributor

Is there's a way to write log output to the txt file in Groovy Script test step?

Is there's a way to write log output to the txt file in Groovy Script test step?

1 REPLY 1
nmrao
Champion Level 3

@Bishal,

 

Here you go

 

//You can change the log content
def content = "This is the message that user like to log, but to a file"
//You can change the file name def fileName = '/tmp/test.log' //Write to the file new File(fileName).write(content)

 



Regards,
Rao.
cancel
Showing results for 
Search instead for 
Did you mean: