Forum Discussion

pamelaloh's avatar
pamelaloh
Occasional Contributor
14 years ago

Export http log to a file with groovy script

Hi,

i wanna export the log window 'http log' to a file.
i want to do this with a groovy script.
then, i found the following script in the forum
http://dir.eviware.com/forum/viewtopic.php?f=2&t=66&p=208#p208

however, when i executed in groovy, i got this error message:
groovy.lang.MissingMethodException: No signature of method: com.eviware.soapui.support.log.InspectorLog4JMonitor.indexOfTab() is applicable for argument types: (java.lang.String) values: [http log]


kindly advice how to resolve it.
cheers.

1 Reply

  • Hi,

    the post you are reffering to is pretty old and the code is changed since
    use this code instead:

    def logArea = com.eviware.soapui.SoapUI.logMonitor
    if( logArea != null )
    {
    def jlogList= logArea.getLogArea( "http log" );
    if( jlogList !=null )
    {
    def model = jlogList.model
    if( model.size > 0 )
    {
    def out = new java.io.PrintWriter( "myfile.log" )

    for( c in 0..(model.size-1) )
    out.println( model.getElementAt( c ))

    out.close()
    }
    }
    }




    hope this helps

    regards
    nebojsa
    SmartBear Software