Forum Discussion
William_Willafo
15 years agoOccasional Contributor
Thank you! This is just what I was looking for.
For anyone else who is interested, here are my code snippets:
Java class:
( import the log4j library jar into your project, find it in the <soapui_program_dir>/bin/ )
Build and compile then place the jar file in <soapui_program_dir>/bin/ext/
Restart soapUI
Groovy Script within soapUI:
Run the groovy script within soapUI and the following is output in the Log Output:
For anyone else who is interested, here are my code snippets:
Java class:
( import the log4j library jar into your project, find it in the <soapui_program_dir>/bin/ )
package soapui.sandbox;
public class LogTest {
public static void HelloWorld(org.apache.log4j.Logger log) {
log.info("Hello World!");
}
}
Build and compile then place the jar file in <soapui_program_dir>/bin/ext/
Restart soapUI
Groovy Script within soapUI:
import soapui.sandbox.LogTest;
LogTest.HelloWorld(log);
Run the groovy script within soapUI and the following is output in the Log Output:
Thu Mar 10 09:06:48 EST 2011:INFO:Hello World!