public class RenderingConsole extends Object
The Delegate provides the "Super" lines for the rendered frame, log lines will be queued by the RenderingConsole.
If no delegate is configured (or if rendering is not running), lines will be logged immediately and won't be queued for the next frame.
If something writes to the underlying Console's stderr/stdout streams, rendering will be disabled. If something writes to the real underlying stderr/stdout, we won't notice and it will get overwritten.
TODO(cjhopman): For both those stderr/stdout cases, we should just capture the logging and queue it the same as logging that goes explicitly to the RenderingConsole. For real System.err/System.out we might need something a little fancy.
Constructor and Description |
---|
RenderingConsole(Clock clock,
Console console) |
Modifier and Type | Method and Description |
---|---|
protected void |
clearPendingLogLines() |
void |
close()
Shuts down rendering.
|
Ansi |
getAnsi() |
protected com.google.common.collect.ImmutableList<String> |
getPendingLogLines() |
Verbosity |
getVerbosity() |
boolean |
isRendering() |
void |
logLines(Collection<String> lines)
Logs the provided lines to stderr.
|
void |
logLines(String... lines)
Logs the provided lines to stderr.
|
void |
printToStdOut(String testOutput)
Deprecated.
|
void |
registerDelegate(com.facebook.buck.event.listener.RenderingConsole.Delegate delegate)
Registers a delegate to provide the data to render and starts the rendering thread.
|
public Ansi getAnsi()
public Verbosity getVerbosity()
public void registerDelegate(com.facebook.buck.event.listener.RenderingConsole.Delegate delegate)
public void logLines(String... lines)
public void logLines(Collection<String> lines)
@Deprecated public void printToStdOut(String testOutput)
protected com.google.common.collect.ImmutableList<String> getPendingLogLines()
protected void clearPendingLogLines()
public void close()
Logging after calling close() will not be queued.
public boolean isRendering()