|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthudson.util.AbstractTaskListener
hudson.util.StreamTaskListener
public class StreamTaskListener
TaskListener
that generates output into a single stream.
This object is remotable.
Field Summary |
---|
Fields inherited from interface hudson.model.TaskListener |
---|
NULL |
Constructor Summary | |
---|---|
StreamTaskListener()
Deprecated. as of 1.349 Use TaskListener.NULL |
|
StreamTaskListener(File out)
|
|
StreamTaskListener(File out,
Charset charset)
|
|
StreamTaskListener(OutputStream out)
|
|
StreamTaskListener(OutputStream out,
Charset charset)
|
|
StreamTaskListener(PrintStream out)
Deprecated. as of 1.349 The caller should use StreamTaskListener(OutputStream, Charset) to pass in
the charset and output stream separately, so that this class can handle encoding correctly,
or use fromStdout() or fromStderr() . |
|
StreamTaskListener(Writer w)
|
Method Summary | |
---|---|
void |
annotate(ConsoleNote ann)
Annotates the current position in the output log by using the given annotation. |
void |
close()
|
void |
closeQuietly()
Closes this listener and swallows any exceptions, if raised. |
PrintWriter |
error(String msg)
An error in the build. |
PrintWriter |
error(String format,
Object... args)
Formatter.format(String, Object[]) version of TaskListener.error(String) . |
PrintWriter |
fatalError(String msg)
A fatal error in the build. |
PrintWriter |
fatalError(String format,
Object... args)
Formatter.format(String, Object[]) version of TaskListener.fatalError(String) . |
static StreamTaskListener |
fromStderr()
|
static StreamTaskListener |
fromStdout()
|
PrintStream |
getLogger()
This writer will receive the output of the build |
Methods inherited from class hudson.util.AbstractTaskListener |
---|
hyperlink |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StreamTaskListener(PrintStream out)
StreamTaskListener(OutputStream, Charset)
to pass in
the charset and output stream separately, so that this class can handle encoding correctly,
or use fromStdout()
or fromStderr()
.
public StreamTaskListener(OutputStream out)
public StreamTaskListener(OutputStream out, Charset charset)
public StreamTaskListener(File out) throws IOException
IOException
public StreamTaskListener(File out, Charset charset) throws IOException
IOException
public StreamTaskListener(Writer w) throws IOException
IOException
public StreamTaskListener() throws IOException
TaskListener.NULL
IOException
Method Detail |
---|
public static StreamTaskListener fromStdout()
public static StreamTaskListener fromStderr()
public PrintStream getLogger()
TaskListener
getLogger
in interface TaskListener
public PrintWriter error(String msg)
TaskListener
error
in interface TaskListener
public PrintWriter error(String format, Object... args)
TaskListener
Formatter.format(String, Object[])
version of TaskListener.error(String)
.
error
in interface TaskListener
public PrintWriter fatalError(String msg)
TaskListener
fatalError
in interface TaskListener
public PrintWriter fatalError(String format, Object... args)
TaskListener
Formatter.format(String, Object[])
version of TaskListener.fatalError(String)
.
fatalError
in interface TaskListener
public void annotate(ConsoleNote ann) throws IOException
TaskListener
annotate
in interface TaskListener
IOException
public void close() throws IOException
close
in interface Closeable
IOException
public void closeQuietly()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |