api / org.gradle.api.logging / LoggingManager

LoggingManager

interface LoggingManager : LoggingOutput

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

Functions

captureStandardError

abstract fun captureStandardError(level: LogLevel): LoggingManager

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.

captureStandardOutput

abstract fun captureStandardOutput(level: LogLevel): LoggingManager

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

getLevel

abstract fun getLevel(): LogLevel

Returns the current logging level.

getStandardErrorCaptureLevel

abstract fun getStandardErrorCaptureLevel(): LogLevel

Returns the log level that output written to System.err will be mapped to.

getStandardOutputCaptureLevel

abstract fun getStandardOutputCaptureLevel(): LogLevel

Returns the log level that output written to System.out will be mapped to.

Inherited Functions

addStandardErrorListener

abstract fun addStandardErrorListener(listener: StandardOutputListener): Unit

Adds a listener which receives output written to standard error by the Gradle logging system.

addStandardOutputListener

abstract fun addStandardOutputListener(listener: StandardOutputListener): Unit

Adds a listener which receives output written to standard output by the Gradle logging system.

removeStandardErrorListener

abstract fun removeStandardErrorListener(listener: StandardOutputListener): Unit

Removes a listener from standard error.

removeStandardOutputListener

abstract fun removeStandardOutputListener(listener: StandardOutputListener): Unit

Removes a listener from standard output.