Forum Discussion

ctamisier's avatar
11 years ago

API and log4j path

Hi,

I am using SoapUI 4.5.1 api.
I'd like to change the path of soapui-log4j.xml because I want to change log level.

I checked in the source code and it seems that i needed to set 'soapui.home' property to the path I want to use.
so i initialise like this: System.setProperty("soapui.home", newPath);

I found the the method initLog() in DefaultSoapUICore class which do this:

File log4jconfig = root == null ? new File( logFileName ) : new File( new File( getRoot() ), logFileName );


the root variable is null so log4jconfig is set to "new File( logFileName )",
and I want to set it to "new File( new File( getRoot() ), logFileName );"

but the correct affectation of root variable is made in getRoot() which is called too late in this code.

is There a way to fix root variable using another way than set "soapui.home" property.

"getRoot() == null" should be called instead of "root == null" in this line of code ?
Did I misunderstand something ?

Thanks a lot

BR