Topic
4 replies Latest Post - ‏2012-11-15T18:48:28Z by SystemAdmin
Kevin_Du
Kevin_Du
14 Posts
ACCEPTED ANSWER

Pinned topic Enable / disable Log in a class

‏2012-08-27T17:02:30Z |
Hi,

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(RationalTestScriptConstants.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.*;
import com.rational.test.ft.object.interfaces.GuiTestObject;
import com.rational.test.ft.object.interfaces.RootTestObject;
import com.rational.test.ft.object.interfaces.TestObject;
import com.rational.test.ft.object.interfaces.TopLevelTestObject;
import com.rational.test.ft.script.SubitemFactory;
import com.rational.test.ft.script.RationalTestScript;
import com.rational.test.ft.script.RationalTestScriptConstants;
import com.rational.test.ft.services.*;
any help on disabling the log in a class is much appreciated.
Updated on 2012-11-15T18:48:28Z at 2012-11-15T18:48:28Z by SystemAdmin
  • Milind_Gholap
    Milind_Gholap
    35 Posts
    ACCEPTED ANSWER

    Re: Enable / disable Log in a class

    ‏2012-10-19T13:31:57Z  in response to Kevin_Du
    Try this

    RationalTestScript.setOption(IOptionName.LOG_FORMAT, "none");
  • SystemAdmin
    SystemAdmin
    16727 Posts
    ACCEPTED ANSWER

    Re: Enable / disable Log in a class

    ‏2012-11-01T14:13:51Z  in response to Kevin_Du
    You can try this if you're still looking for a solution:

    http://publib.boulder.ibm.com/infocenter/rfthelp/v8r2/index.jsp?topic=/com.ibm.rational.test.ft.doc/topics/t_disablingenhancedlogresults.html
    • Kevin_Du
      Kevin_Du
      14 Posts
      ACCEPTED ANSWER

      Re: Enable / disable Log in a class

      ‏2012-11-01T19:08:34Z  in response to SystemAdmin
      You can try this if you're still looking for a solution: http://publib.boulder.ibm.com/infocenter/rfthelp/v8r2/index.jsp?topic=/com.ibm.rational.test.ft.doc/topics/t_disablingenhancedlogresults.html
      

      This seems to work. Thank you all for helping
      Updated on 2014-03-25T12:58:49Z at 2014-03-25T12:58:49Z by iron-man
      • SystemAdmin
        SystemAdmin
        16727 Posts
        ACCEPTED ANSWER

        Re: Enable / disable Log in a class

        ‏2012-11-15T18:48:28Z  in response to Kevin_Du
        A bit of a follow up. Does anyone know if there is a similar ivory property, or other method, for disabling all informational messages logged by RFT? IE "Script start", "Start application" etc?