Forum Discussion

sha09's avatar
sha09
Occasional Contributor
8 years ago

Logs not printed when exported as jar

I am trying to run soapui project using soapui jar. But I am having problem with the logging.

soapui overwrites the log4j settings:

I followed the following post and get it fixed by overwriting the system property:

https://community.smartbear.com/t5/SoapUI-NG/SoapUI-overwrites-and-closes-log4j-settings/td-p/30694

 

System.setProperty("soapui.log4j.config", Mainn.class.getClassLoader().getResource("log4j.xml").getPath());

Now when I export the jar ... the log displayed in command window still shows only logs generated by soapUi.

This seems similar to this post:

https://community.smartbear.com/t5/SoapUI-Open-Source/Logs-not-printed-when-war-deployed-in-Tomcat/td-p/35260

Eclipse console log

command log when running the jar

But it is still not working.

Can anybody please suggest me how it can be fixed?

 

Thank you for your time and effort!

 

 

 

 

3 Replies

    • sha09's avatar
      sha09
      Occasional Contributor

      Hello Rupert,

       

      Thank you for your reply.

      Yes I am running SoapUI using JAVA including a jar dependency.

      My problem right now is not with the sl4j error message.

      When I run the program in my Eclipse everything is working perfect, but when I export the whole program as a jar, then only the soapUI logs are displayed and the log from my program are all overwritten. (I hope the picture above makes it more clear!)

      Do you have any suggestions how it could be fixed?

       

      Thank you!

       

      Regards,

      Shailesh

      • rupert_anderson's avatar
        rupert_anderson
        Valued Contributor

        Hi Shailesh,

         

        Do you see that slf4j error at all when running though? If so, is it there when run from inside Eclipse?

         

        If the slf4j error is present Groovy logging will not show up, only the standard output.

         

        Regards,

        Rupert