I've this question in IBM forum but no one answered [img]/images/graemlins/frown.gif[/img]. so I am hoping soemone here could point me to the right direction.
I am currently trying to disable the log in a class so that it would not lof all the getProperty stuffs but haviong diffulty in doing it in a class.
I am able to use the following method in any Functions setCurrentLogFilter(ENABLE_LOGGING);
but ufortunately, when I am trying to use that within a Class, I got Error not recognizing either the ENABLE_LOGGING constants or the setCurrentLogFilter method.
I am able to fix the constants by modifying it to setCurrentLogFilter(*RationalTestScriptConstants*. ENABLE_LOGGING); The remaining problem is the setCurrentLogFilter method not being recognize in the Class.
I further modified the code to RationalTestScript.setCurrentLogFilter(RationalTes tScriptConstants.ENABLE_LOGGING); but now it gives me the following error: Cannot make a static reference to the non-static method setCurrentLogFilter(int) from the type RationalTestScript
My class currently have the following imports:
import com.rational.test.ft.object.interfaces.GuiTestObje ct;
import com.rational.test.ft.object.interfaces.RootTestObj ect;
import com.rational.test.ft.object.interfaces.TopLevelTes tObject;
import com.rational.test.ft.script.RationalTestScriptCons tants;
any help on disabling the log in a class is much appreciated.
I've edited the file as instructed and it is still does not recognize
Could you please help me with how this solution worked. I have the same issue now. I am using RFT 8.5.1 and want to remove getProperty line from log file or want to use setCurrentLogFilter(ENABLE_LOGGING) in a class file.
Its better to use my approach of modifying the ivory.properties file.
setCurrentLogFilter(ENABLE_LOGGING) should be added in the script before and after the step where we have called the getProperty which is not recommanded.
ivory.properties file is the RFT configuration file so its better to edit this file for removing the getProperty logging in playback logs.
Open ivory.properties file with Notepad (Make sure you have edit rights on the ivory.properties file)
Add the following line of code at the end of the file contents:rational.test.ft.log.enhanced=false
Save the ivory.properties file.
Open RFT and continue