Forum Discussion

jpw's avatar
jpw
New Contributor
7 years ago

In ReadyAPI 2.3.0 I can't see any log output

At some point after upgrading to ReadyAPI 2.3.0, all of my log outputs have completely stopped working. Aside from some messages saying "Added AutoFactory for [PluginTestStep]" which appear when the application first starts up, I can't see any log messages in any of the log tabs (ReadyAPI Log, Script Log, Error Log, etc.). This also applies to running an individual Groovy step; I cannot see any of my log.info messages either in the global Script log or the output panel underneath the Groovy step.

 

I checked my Preferences and didn't see anything out of the ordinary, and this has worked for me in every previous version of ReadyAPI going back to 1.5. I have some coworkers who are using the same version as me but their logs are working fine, so I am at a loss to why it's not working for me.

 

  • jpw's avatar
    jpw
    7 years ago

    bwennekeswrote:

    I was having similar problems and did some research to find out what could be the cause.

     

    I found out with the code below (put it in a groovy step and run) that info was not enabled. Errors I did still see though.

    def isInfoOn = log.isInfoEnabled()

    log.error(isInfoOn)

     

    So next I enabled the info logging and tried again:

    import org.apache.log4j.Logger

    import org.apache.log4j.Level

    log.setLevel(Level.INFO)

    log.info("hi")

     

    That did work for me, but then I had to enable it every time, which was not much of a solution.

     

    After some more digging I found the 'soapui-log4j.xml' in my bin folder inside the ReadyAPI folder. This is apparently where the level of logging is set for all different types. I set the logging level of root to INFO (at the bottom in my case) and that did the trick!


    Thanks for that detailed response. I followed your instructions and the isInfoEnabled() function confirmed my logging was disabled. But my soapui-log4j.xml file was already set to INFO, so your permanent fix didn't apply to my situation.

     

    It turns out, I was right about my prior hunch about the newly added jar file. There must be something in there that disables log4j, because I was able to delete the jar from my Program Files folder, and after restarting ReadyAPI my logging was enabled again. Thanks for letting me know about the isInfoEnabled() function, it really helped.

  • bwennekes's avatar
    bwennekes
    New Contributor

    I was having similar problems and did some research to find out what could be the cause.

     

    I found out with the code below (put it in a groovy step and run) that info was not enabled. Errors I did still see though.

    def isInfoOn = log.isInfoEnabled()

    log.error(isInfoOn)

     

    So next I enabled the info logging and tried again:

    import org.apache.log4j.Logger

    import org.apache.log4j.Level

    log.setLevel(Level.INFO)

    log.info("hi")

     

    That did work for me, but then I had to enable it every time, which was not much of a solution.

     

    After some more digging I found the 'soapui-log4j.xml' in my bin folder inside the ReadyAPI folder. This is apparently where the level of logging is set for all different types. I set the logging level of root to INFO (at the bottom in my case) and that did the trick!

    • jpw's avatar
      jpw
      New Contributor

      bwennekeswrote:

      I was having similar problems and did some research to find out what could be the cause.

       

      I found out with the code below (put it in a groovy step and run) that info was not enabled. Errors I did still see though.

      def isInfoOn = log.isInfoEnabled()

      log.error(isInfoOn)

       

      So next I enabled the info logging and tried again:

      import org.apache.log4j.Logger

      import org.apache.log4j.Level

      log.setLevel(Level.INFO)

      log.info("hi")

       

      That did work for me, but then I had to enable it every time, which was not much of a solution.

       

      After some more digging I found the 'soapui-log4j.xml' in my bin folder inside the ReadyAPI folder. This is apparently where the level of logging is set for all different types. I set the logging level of root to INFO (at the bottom in my case) and that did the trick!


      Thanks for that detailed response. I followed your instructions and the isInfoEnabled() function confirmed my logging was disabled. But my soapui-log4j.xml file was already set to INFO, so your permanent fix didn't apply to my situation.

       

      It turns out, I was right about my prior hunch about the newly added jar file. There must be something in there that disables log4j, because I was able to delete the jar from my Program Files folder, and after restarting ReadyAPI my logging was enabled again. Thanks for letting me know about the isInfoEnabled() function, it really helped.

  • groovyguy's avatar
    groovyguy
    Community Hero

    I had something similar and had right-clicked on the log area and disabled it by accident. Once I re-enabled it it worked as expected. 

    • jpw's avatar
      jpw
      New Contributor

      groovyguywrote:

      I had something similar and had right-clicked on the log area and disabled it by accident. Once I re-enabled it it worked as expected. 


      I just confirmed, the log area has been enabled the whole time. I tried disabling and re-enabling it but that did not fix the issue either.

  • jpw's avatar
    jpw
    New Contributor

    Just updating my progress with this issue - I went back to using ReadyAPI 2.2.0 and for a while the log messages worked fine, but then it too lost the ability to display any logs. The only change I can remember making is adding a new JAR file to the /bin/ext/ and /lib/ folder in the ReadyAPI 2.2.0 Program Files. Perhaps this JAR file is disabling the logs for me? I will ask the developer what's going on.