Package hudson.console
Class ConsoleLogFilter
- java.lang.Object
-
- hudson.console.ConsoleLogFilter
-
- All Implemented Interfaces:
ExtensionPoint
public abstract class ConsoleLogFilter extends Object implements ExtensionPoint
A hook to allow filtering of information that is written to the console log. UnlikeConsoleAnnotator
andConsoleNote
, this class provides direct access to the underlyingOutputStream
so it's possible to suppress data, which isn't possible from the other interfaces. (ArgumentListBuilder.add(String, boolean)
is a simpler way to suppress a single password.)Implementations which are
Serializable
may be sent to an agent JVM for processing. In particular, this happens under JEP-210. In this case, the implementation should not assume thatJenkinsJVM.isJenkinsJVM()
, and if generatingConsoleNote
s will need to encode them on the master side first.- Since:
- 1.383
- Author:
- dty
- See Also:
BuildWrapper.decorateLogger(hudson.model.AbstractBuild, java.io.OutputStream)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description ConsoleLogFilter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static ExtensionList<ConsoleLogFilter>
all()
All the registeredConsoleLogFilter
s.OutputStream
decorateLogger(AbstractBuild build, OutputStream logger)
Deprecated.as of 1.632.OutputStream
decorateLogger(Computer computer, OutputStream logger)
Called to decorate logger for master/agent communication.OutputStream
decorateLogger(Run build, OutputStream logger)
Called on the start of each build, giving extensions a chance to intercept the data that is written to the log.
-
-
-
Method Detail
-
decorateLogger
@Deprecated public OutputStream decorateLogger(AbstractBuild build, OutputStream logger) throws IOException, InterruptedException
Deprecated.as of 1.632. UsedecorateLogger(Run, OutputStream)
Called on the start of each build, giving extensions a chance to intercept the data that is written to the log.- Throws:
AbstractMethodError
- when a plugin overrides neither this method nordecorateLogger(Run, OutputStream)
.IOException
InterruptedException
-
decorateLogger
public OutputStream decorateLogger(Run build, OutputStream logger) throws IOException, InterruptedException
Called on the start of each build, giving extensions a chance to intercept the data that is written to the log.Even though this method is not marked 'abstract', this is the method that must be overridden by extensions.
- Throws:
IOException
InterruptedException
-
decorateLogger
public OutputStream decorateLogger(@NonNull Computer computer, OutputStream logger) throws IOException, InterruptedException
Called to decorate logger for master/agent communication.- Parameters:
computer
- Agent computer for which the logger is getting decorated. Useful to do contextual decoration.- Throws:
IOException
InterruptedException
- Since:
- 1.632
-
all
public static ExtensionList<ConsoleLogFilter> all()
All the registeredConsoleLogFilter
s.
-
-