Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD

## org.gradle.api.logging
[Java] Interface LoggingManager

    org.gradle.api.logging.LoggingManager
      org.gradle.api.logging.LoggingOutput

All Superinterfaces:
  LoggingOutput

    public interface LoggingManager
    extends LoggingOutput

A `LoggingManager` provides access to and control over the Gradle logging system. Using this interface, you can control the current logging level and standard output and error capture.

Method Summary
`LoggingManager` | `captureStandardError(LogLevel level)` Requests that output written to System.err be routed to Gradle's logging system.
`LoggingManager` | `captureStandardOutput(LogLevel level)` Requests that output written to System.out be routed to Gradle's logging system.
`LoggingManager` | `disableStandardOutputCapture()` Disables routing System.out and System.err to Gradle's logging system.
`LogLevel` | `getLevel()` Returns the current logging level.
`LogLevel` | `getStandardErrorCaptureLevel()` Returns the log level that output written to System.err will be mapped to.
`LogLevel` | `getStandardOutputCaptureLevel()` Returns the log level that output written to System.out will be mapped to.
`boolean` | `isStandardOutputCaptureEnabled()` Returns true when standard output capture is enabled.
`LoggingManager` | `setLevel(LogLevel logLevel)` Sets the minimum logging level.

Methods inherited from interface LoggingOutput
addStandardErrorListener, addStandardOutputListener, removeStandardErrorListener, removeStandardOutputListener

Method Detail

### captureStandardError

    public LoggingManager captureStandardError(LogLevel level)

  Requests that output written to System.err be routed to Gradle's logging system. The default is that System.err is routed to LogLevel.ERROR.
  Parameters:
    `level` - The log level to route System.err to.
  Returns:
    this

### captureStandardOutput

    public LoggingManager captureStandardOutput(LogLevel level)

  Requests that output written to System.out be routed to Gradle's logging system. The default is that System.out is routed to LogLevel.QUIET
  Parameters:
    `level` - The log level to route System.out to.
  Returns:
    this

### disableStandardOutputCapture

    @Deprecated
    public LoggingManager disableStandardOutputCapture()

  Disables routing System.out and System.err to Gradle's logging system.
  Returns:
    this

### getLevel

    public LogLevel getLevel()

  Returns the current logging level.
  Returns:
    The current logging level.

### getStandardErrorCaptureLevel

    public LogLevel getStandardErrorCaptureLevel()

  Returns the log level that output written to System.err will be mapped to.
  Returns:
    The log level. Returns null when standard error capture is disabled.

### getStandardOutputCaptureLevel

    public LogLevel getStandardOutputCaptureLevel()

  Returns the log level that output written to System.out will be mapped to.
  Returns:
    The log level. Returns null when standard output capture is disabled.

### isStandardOutputCaptureEnabled

    @Deprecated
    public boolean isStandardOutputCaptureEnabled()

  Returns true when standard output capture is enabled.
  Returns:
    true when standard output capture is enabled.

### setLevel

    public LoggingManager setLevel(LogLevel logLevel)

  Sets the minimum logging level. All messages at a lower level are discarded.
  Parameters:
    `logLevel` - The minimum logging level.
  Returns:
    this

Groovy Documentation