Forum Discussion

Liberty_Informa's avatar
Liberty_Informa
Regular Contributor
11 years ago

Suppressing groovy logs

Hi

I am requesting for similar feature that comes with Log4J kind of utility. Developers need to add many log statements to debug the program however we can not bear those many log statements on the production environment. As a result all the log statements except declared with the level FATAL are suppressed.

Is it possible to add feature something like this in soapUI? I do not want log.info or log.debug kind of statements to be printed in the log file where my headless soapUI tests (we can call it - production for soapUI tests) are run. May be you can think of adding something in the soapUI preferences.

Thanks.

4 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3
    soapui-log4j.xml is allowed to change log level to the required irrespective of how statements appear in the scripts. Isn't this helpful? or is it specific that this configuration should be available in preferences?
  • Liberty_Informa's avatar
    Liberty_Informa
    Regular Contributor
    nmrao This is really useful to give me direction.

    I want to suppress log statements, those appears in the log file that is generated as an output from TESTRUNNER command.

    Do you know exactly which value to update in the 'soapui-log4j.xml' file so as to suppress our own log statements written with the log level of .info or .debug in the groovy steps?

    Thanks.
  • nmrao's avatar
    nmrao
    Champion Level 3
    Default soapui-log4j.xml has appenders for soapui.log, soapui-errors.log files.

    So, tried to play there and below is the screen shot and marked changes from INFO/DEBUG to ERROR. Then restart soapui, do some activity and see the difference in those log fies i.e., nothing in those files except if there is any error unlike earlier. May be you can preserve those logs before restarting soapui after log4j changes, so that can be compared later.

    I believe, similar appender can be added to groovy script log as well - could not try. Please post the result if you get a chance to try.


    And also believe that you may change at logger level, just below the lines of attached screen shot. Please keep a back of original file before your changes for testing and revert them when you want the default settings.