Jenkins : Log Sanitizer plugin

This plugin allows users to suppress output of enclosing pipelines steps to Console Output.

Using in pipeline workflows

The following pipeline syntax can be used without allocating a node.

sanitizer(false) {
   echo 'Hello World'
   bat "dir"

The output of echo and bat pipeline steps will not be printed on console logs. 

Boolean value in parameter allows you to display content based on this flag. If false is passed echo and bat will print on Console Logs.