This example code shows how to implement logging for the proxy code in Java:
import com.rational.test.ft.util.FtDebug; . public class MyProxy extends BaseProxy { protected static FtDebug debug = new FtDebug("myproxies"); . void anyMethod() { debug.trace("Beginging of anyMethod()"); . debug.verbose("I'm doing this!"); . debug.warning("Not critical, good to have it fixed"); . debug.error("I shouldn't have been here!!") ; . debug.trace("End of anyMethod()"); } }
This example code shows how to implement logging for the proxy code in .Net:
. using Rational.Test.Ft.Util; . public class MyProxy : BaseProxy { protected static FtDebug debug = new FtDebug("myproxies"); . void anyMethod() { debug.Trace("Beginging of anyMethod()"); . debug.Verbose("I'm doing this!"); . debug.Warning("Not critical, good to have it fixed"); . debug.Error("I shouldn't have been here!!") ; . debug.Trace("End of anyMethod()"); } }
In this example, the FtDebug() method passes the myproxies string. You can use this string in the ivory.properties file available in C:\Program Files\IBM\SDP70\FunctionalTester\bin\ to control the level of log information emitted while execution. This example code shows how you can use the myproxies string in the ivory.properties file:
### ### Debugging options ### # The following propeties are used to control the debugging output generated by the FT # product. In production versions this output is minimal, limited primarily to error # and warning level information. rational.test.ft.debug.enabled=true rational.test.ft.debug.clear_on_init=false rational.test.ft.debug.filename=c:/ivDebug.txt # filter levels: error,0;warning,1;debug,2;verbose,3 rational.test.ft.debug.filter=default,1;myproxies,3;In this example, the value for the myproxies string is set to 3. For more information, see the "Collecting IBM Rational Functional Tester error logs" topic.