Aaron Frantisak
Aaron Frantisak

Reputation: 553

Jenkins how to hide system level console output

Is it possible to hide all the .bat file wizardry that Jenkins writes out to the build log?

What I get is:

[release] $ cmd /c call C:\Users\Jenkins\AppData\...8991397464.bat

c:\Jenkins\jobs\release>python -u my_python.py 
...job output...
c:\Jenkins\jobs\release>exit 0 
Finished: SUCCESS

But what I would like to see is simply:

...job output...
Finished: SUCCESS

I can't find any build verbosity settings in Jenkins anywhere. It would be nice to be able to turn off the debug info once you have your jobs running stably.

Upvotes: 1

Views: 6758

Answers (3)

David
David

Reputation: 164

This is not something you can alter through any of the xml files. Build task commands are called from within the Jenkins build (Launcher.java). An easy way to prevent these commands from displaying in your job's console output is the Log File Filter. I currently use this in my Jenkins instance for this purpose (using Jenkins ver. 2.176.3). Once installed go to Manage Jenkins > Configure System. Look for Log File Filter Global config , enter .cmd /c call. as your Regexp and leave the Replacement as null. enter image description here

Upvotes: 1

Vishnu S
Vishnu S

Reputation: 13

Or you can simply redirect ('>') the console output to a temporary log file.

Upvotes: 1

CIGuy
CIGuy

Reputation: 5114

You can get rid of most, but not all of it by adding echo off at the beginning of the execute windows bath command dialog.

Upvotes: 1

Related Questions