public class DefaultLoggingManager extends Object implements LoggingManagerInternal
| Constructor and Description |
|---|
DefaultLoggingManager(LoggingSystem loggingSystem,
LoggingSystem stdOutLoggingSystem,
LoggingSystem stdErrLoggingSystem,
LoggingOutputInternal loggingOutput) |
| Modifier and Type | Method and Description |
|---|---|
void |
addOutputEventListener(OutputEventListener listener) |
void |
addStandardErrorListener(StandardOutputListener listener)
Adds a listener which receives output written to standard error by the Gradle logging system.
|
void |
addStandardOutputListener(StandardOutputListener listener)
Adds a listener which receives output written to standard output by the Gradle logging system.
|
DefaultLoggingManager |
captureStandardError(LogLevel level)
Requests that output written to System.err be routed to Gradle's logging system.
|
DefaultLoggingManager |
captureStandardOutput(LogLevel level)
Requests that output written to System.out be routed to Gradle's logging system.
|
void |
colorStdOutAndStdErr(boolean colorOutput) |
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.
|
void |
removeOutputEventListener(OutputEventListener listener) |
void |
removeStandardErrorListener(StandardOutputListener listener)
Removes a listener from standard error.
|
void |
removeStandardOutputListener(StandardOutputListener listener)
Removes a listener from standard output.
|
DefaultLoggingManager |
setLevel(LogLevel logLevel)
Sets the minimum logging level.
|
DefaultLoggingManager |
start()
Starts redirection of System.out and System.err to the Gradle logging system.
|
DefaultLoggingManager |
stop()
Restores System.out and System.err to the values they had before
StandardOutputCapture.start() has been called. |
public DefaultLoggingManager(LoggingSystem loggingSystem, LoggingSystem stdOutLoggingSystem, LoggingSystem stdErrLoggingSystem, LoggingOutputInternal loggingOutput)
public DefaultLoggingManager start()
StandardOutputCapturestart in interface LoggingManagerInternalstart in interface StandardOutputCapturepublic DefaultLoggingManager stop()
StandardOutputCaptureStandardOutputCapture.start() has been called.stop in interface LoggingManagerInternalstop in interface StandardOutputCapturepublic DefaultLoggingManager setLevel(LogLevel logLevel)
LoggingManagersetLevel in interface LoggingManagersetLevel in interface LoggingManagerInternallogLevel - The minimum logging level.public LogLevel getLevel()
LoggingManagergetLevel in interface LoggingManagerpublic LogLevel getStandardOutputCaptureLevel()
LoggingManagergetStandardOutputCaptureLevel in interface LoggingManagerpublic DefaultLoggingManager captureStandardOutput(LogLevel level)
LoggingManagerLogLevel.QUIETcaptureStandardOutput in interface LoggingManagercaptureStandardOutput in interface LoggingManagerInternallevel - The log level to route System.out to.public DefaultLoggingManager captureStandardError(LogLevel level)
LoggingManagerLogLevel.ERROR.captureStandardError in interface LoggingManagercaptureStandardError in interface LoggingManagerInternallevel - The log level to route System.err to.public LogLevel getStandardErrorCaptureLevel()
LoggingManagergetStandardErrorCaptureLevel in interface LoggingManagerpublic void addStandardOutputListener(StandardOutputListener listener)
LoggingOutputaddStandardOutputListener in interface LoggingOutputlistener - The listener to add.public void addStandardErrorListener(StandardOutputListener listener)
LoggingOutputaddStandardErrorListener in interface LoggingOutputlistener - The listener to add.public void removeStandardOutputListener(StandardOutputListener listener)
LoggingOutputremoveStandardOutputListener in interface LoggingOutputlistener - The listener to remove.public void removeStandardErrorListener(StandardOutputListener listener)
LoggingOutputremoveStandardErrorListener in interface LoggingOutputlistener - The listener to remove.public void addOutputEventListener(OutputEventListener listener)
addOutputEventListener in interface LoggingOutputInternalpublic void removeOutputEventListener(OutputEventListener listener)
removeOutputEventListener in interface LoggingOutputInternalpublic void colorStdOutAndStdErr(boolean colorOutput)
colorStdOutAndStdErr in interface LoggingOutputInternalCopyright © 2013. All rights reserved