Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.gradle.api.logging
Class DefaultStandardOutputCapture

    java.lang.Object
      org.gradle.api.logging.DefaultStandardOutputCapture

All Implemented Interfaces:
  StandardOutputCapture

    public class DefaultStandardOutputCapture

extends java.lang.Object
implements StandardOutputCapture

Constructor Summary
`DefaultStandardOutputCapture()` Creates and instance with enabled set to false and LogLevel set to null.
`DefaultStandardOutputCapture(boolean enabled, LogLevel level)`

Method Summary
`boolean` | `equals(java.lang.Object o)`
`LogLevel` | `getLevel()` Returns the log level the output is redirected to.
`int` | `hashCode()`
`boolean` | `isEnabled()` Whether a call to `StandardOutputCapture.start()` will trigger redirection of the output.
`DefaultStandardOutputCapture` | `start()` If `StandardOutputCapture.isEnabled()` is true, it starts output redirection to the Gradle logging system.
`DefaultStandardOutputCapture` | `stop()` If `StandardOutputCapture.isEnabled()` is true, it restores System.out and System.err to the values they had before `StandardOutputCapture.start()` has been called.

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DefaultStandardOutputCapture

    public DefaultStandardOutputCapture()

  Creates and instance with enabled set to false and LogLevel set to null.

### DefaultStandardOutputCapture

    public DefaultStandardOutputCapture(boolean enabled,
                                        LogLevel level)

Method Detail

### start

    public DefaultStandardOutputCapture start()

  Description copied from interface: `StandardOutputCapture`
  If `StandardOutputCapture.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 `StandardOutputLogging`.

  Specified by:
    `start` in interface `StandardOutputCapture`
  See Also:
    `StandardOutputCapture.start()`

### stop

    public DefaultStandardOutputCapture stop()

  Description copied from interface: `StandardOutputCapture`
  If `StandardOutputCapture.isEnabled()` is true, it restores System.out and System.err to the values they had before `StandardOutputCapture.start()` has been called.

  Specified by:
    `stop` in interface `StandardOutputCapture`
  See Also:
    `()`

### isEnabled

    public boolean isEnabled()

  Description copied from interface: `StandardOutputCapture`
  Whether a call to `StandardOutputCapture.start()` will trigger redirection of the output.

  Specified by:
    `isEnabled` in interface `StandardOutputCapture`
  See Also:
    `()`

### getLevel

    public LogLevel getLevel()

  Description copied from interface: `StandardOutputCapture`
  Returns the log level the output is redirected to.

  Specified by:
    `getLevel` in interface `StandardOutputCapture`
  See Also:
    `()`

### equals

    public boolean equals(java.lang.Object o)

  Overrides:
    `equals` in class `java.lang.Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD