Forum Discussion

rdebie's avatar
rdebie
Contributor
17 years ago
Solved

Clear groovy log window from groovy script

Is is possible to clear the groovy log window from a groovy script?

How can i do that?

regards

Raymond Wiertz
  • Try this:

    //Clear Script Logs
    com.eviware.soapui.SoapUI.logMonitor.getLogArea("Script Log").clear()

     

    For open source version check "Script Log" case... it is case sensitive.

     

    thanks.

5 Replies

  • omatzura's avatar
    omatzura
    Super Contributor
    Hi!

    hmm.. try the following:

    def logArea = com.eviware.soapui.SoapUI.logMonitor
    if( logArea != null )
    {
      def ix = logArea.indexOfTab( "groovy log" );
      if( ix >= 0 )
      {
          def logPanel = logArea.getComponentAt( ix )
          logPanel.logList.model.clear()
      }
    }


    This should be in a standard script-library in the future..

    regards!

    /Ole
    eviware.com
    • tech321's avatar
      tech321
      Contributor

      hmm . it does nothing , any other scripts ?

      • New2API's avatar
        New2API
        Frequent Contributor

        Try this:

        //Clear Script Logs
        com.eviware.soapui.SoapUI.logMonitor.getLogArea("Script Log").clear()

         

        For open source version check "Script Log" case... it is case sensitive.

         

        thanks.