Groovy Documentation

org.gradle.api.logging
Interface StandardOutputCapture


interface StandardOutputCapture

author:
Hans Dockter


Method Summary
LogLevel getLevel()

Returns the log level the output is redirected to.

boolean isEnabled()

Whether a call to {

StandardOutputCapture start()

If {

StandardOutputCapture stop()

If { {

 

Method Detail

getLevel

public LogLevel getLevel()
Returns the log level the output is redirected to.


isEnabled

public boolean isEnabled()
Whether a call to #start() will trigger redirection of the output.


start

public StandardOutputCapture start()
If #isEnabled() is true, it starts output redirection to the Gradle logging system. System.out is redirected to the INFO level. System.err is always redirected to the ERROR level. If the standard output is captured globally already, setting the task output capturing has no effect. For more fine-grained control see org.gradle.api.logging.StandardOutputLogging.


stop

public StandardOutputCapture stop()
If #isEnabled() is true, it restores System.out and System.err to the values they had before #start() has been called.


 

Groovy Documentation