Hello,
Can i export the log window 'http log' to a file.
I want to do this with a groovy script.
regards,
Raymond Wiertz

def logArea = com.eviware.soapui.SoapUI.logMonitor
if( logArea != null )
{
def ix = logArea.indexOfTab( "http log" );
if( ix >= 0 )
{
def logPanel = logArea.getComponentAt( ix )
def model = logPanel.logList.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()
}
}
}def logArea = com.eviware.soapui.SoapUI.logMonitor
if( logArea != null )
{
def ix = logArea.indexOfTab( "http log" );
if( ix >= 0 )
{
def logPanel = logArea.getComponentAt( ix )
def model = logPanel.logList.model
if( model.size > 0 )
{
def file = com.eviware.soapui.support.UISupport.fileDialogs.saveAs(
null, "Export Log", "*.log", "*.log", null )
if( file != null )
{
def out = new java.io.PrintWriter( file )
for( c in 0..(model.size-1) )
out.println( model.getElementAt( c ))
out.close()
}
}
}
}

def logArea = com.eviware.soapui.SoapUI.logMonitor
if( logArea != null )
{
def ix = logArea.indexOfTab( "my log" );
def logPanel
if( ix == -1 )
{
logPanel = logArea.addLogArea( "My log", "my.log.category", false )
}
else
{
logPanel = logArea.getComponentAt( ix )
}
logPanel.addLine( "test" )
}def mylog = org.apache.log4j.Logger.getLogger( "my.log.category" )
mylog.info( "testing.." )


