cancel
Showing results for 
Search instead for 
Did you mean: 

ReadyAPI Runner on Jenkins writes logs in the home directory how do I clean up?

SOLVED
Highlighted
Occasional Contributor

ReadyAPI Runner on Jenkins writes logs in the home directory how do I clean up?

We use a ReadyAPI Runner on our Jenkins slave and we have seen that the runner writes his own log for every Job that it running. The log is located in the <home directory>/.readyapi directory, where we have a reduced space to write something. After a while the node will be unusable because the logfiles will exceed the space available. 

In the documentation I did not find an option to specify not to write logs there or a different location. How can I tell the runner not to write logs or write them elsewhere?

I'm running on linux, the used readyapi version is at 2.6.0 at the moment.

Tags (3)
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: ReadyAPI Runner on Jenkins writes logs in the home direktory how do I clean up?

Hi, @chilber!

 

To turn off logging, try editing the "soapui-log4j.xml" file in the "<ReadyAPI installation>/bin" folder.
There is a number of "logger" elements that control what to log. Each of them has one or more child elements "AppenderRef" specifying output. Output defined in the "Appenders" element is located in the same file.
If the appender writes to file (FILE, GLOBAL_GROOVY_LOG, LICENSE_LOG, and ERRORFILE), set the "level" attribute of AppenderRef to "OFF".

 

For example, there is a "groovy.log" logger:

 

<logger name="groovy.log" level="INFO" additivity="false">
<AppenderRef ref="CONSOLE"/>
<AppenderRef ref="GLOBAL_GROOVY_LOG" level="DEBUG"/>
</logger>

 

To turn off logging to files but keep logging in the console output, set level="OFF" for the second AppenderRef:

 

<logger name="groovy.log" level="INFO" additivity="false">
<AppenderRef ref="CONSOLE"/>
<AppenderRef ref="GLOBAL_GROOVY_LOG" level="OFF"/>
</logger>

 

Repeat it for all the logger elements to not write logs to files.Hope it will solve your problem.



Alexander Linkov
SmartBear Technical Writer
 *Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.

View solution in original post

7 REPLIES 7
Highlighted
Community Hero

Re: ReadyAPI Runner on Jenkins writes logs in the home direktory how do I clean up?

Not sure, but you may try override user.directory or user.home system argument in your build step and see.


Regards,
Rao.
Highlighted
Community Manager

Re: ReadyAPI Runner on Jenkins writes logs in the home direktory how do I clean up?

Thanks for the idea Rao!

@chilber  did you try the suggestion?


Sonya Mihaljova
Community and Education Specialist
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Highlighted
Occasional Contributor

Re: ReadyAPI Runner on Jenkins writes logs in the home direktory how do I clean up?

Hi,

moving the home directory will effect other installed software, so this is not an option.

Isn't this a problem for everyone, that the runner will create a hidden directory which will grow for ever without the possibility of cleaning it up? We set up the automation hosts automatically and no one is meant actually log on to it.

Thx

Carsten

Highlighted
Community Hero

Re: ReadyAPI Runner on Jenkins writes logs in the home direktory how do I clean up?

Highlighted
Occasional Contributor

Re: ReadyAPI Runner on Jenkins writes logs in the home direktory how do I clean up?

Hi Rao,

Thank you for pointing this out.

The linked thread has a different problem. The system.out and system.err is perfectly written to the jenkins logfiles.

The logs that are written to the hidden directory <home>/.readyapi are totally useless for me since I have system.out and system.err. If I could I woult deactivate this redundant log location but I got the impression that this cannot be done.

Thanks

Carsten

 

Highlighted

Re: ReadyAPI Runner on Jenkins writes logs in the home direktory how do I clean up?

Hi, @chilber!

 

To turn off logging, try editing the "soapui-log4j.xml" file in the "<ReadyAPI installation>/bin" folder.
There is a number of "logger" elements that control what to log. Each of them has one or more child elements "AppenderRef" specifying output. Output defined in the "Appenders" element is located in the same file.
If the appender writes to file (FILE, GLOBAL_GROOVY_LOG, LICENSE_LOG, and ERRORFILE), set the "level" attribute of AppenderRef to "OFF".

 

For example, there is a "groovy.log" logger:

 

<logger name="groovy.log" level="INFO" additivity="false">
<AppenderRef ref="CONSOLE"/>
<AppenderRef ref="GLOBAL_GROOVY_LOG" level="DEBUG"/>
</logger>

 

To turn off logging to files but keep logging in the console output, set level="OFF" for the second AppenderRef:

 

<logger name="groovy.log" level="INFO" additivity="false">
<AppenderRef ref="CONSOLE"/>
<AppenderRef ref="GLOBAL_GROOVY_LOG" level="OFF"/>
</logger>

 

Repeat it for all the logger elements to not write logs to files.Hope it will solve your problem.



Alexander Linkov
SmartBear Technical Writer
 *Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.

View solution in original post

Highlighted
Community Manager

Re: ReadyAPI Runner on Jenkins writes logs in the home direktory how do I clean up?

@chilber this should be the answer you are looking for🙂 Let us know you have more questions!


Sonya Mihaljova
Community and Education Specialist
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video:
Announcements
Script Wanted
The new challenge is here!

Create a script to сhange an XPath Match assertion to a JSONPath Match assertion for the TechCorner tag!


Scripts created in July:
- A script to generate an email when an assertion fails
- A script to change the request body before sending it to the server
Top Kudoed Authors