hudson.util
Class LogTaskListener

java.lang.Object
  extended by hudson.util.AbstractTaskListener
      extended by hudson.util.LogTaskListener
All Implemented Interfaces:
TaskListener, Serializable

public class LogTaskListener
extends AbstractTaskListener
implements Serializable

TaskListener which sends messages to a Logger.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface hudson.model.TaskListener
NULL
 
Constructor Summary
LogTaskListener(Logger logger, Level level)
           
 
Method Summary
 void annotate(ConsoleNote ann)
          Annotates the current position in the output log by using the given annotation.
 void close()
           
 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).
 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

LogTaskListener

public LogTaskListener(Logger logger,
                       Level level)
Method Detail

getLogger

public PrintStream getLogger()
Description copied from interface: TaskListener
This writer will receive the output of the build

Specified by:
getLogger in interface TaskListener
Returns:
must be non-null.

error

public PrintWriter error(String msg)
Description copied from interface: TaskListener
An error in the build.

Specified by:
error in interface TaskListener
Returns:
A writer to receive details of the error. Not null.

error

public PrintWriter error(String format,
                         Object... args)
Description copied from interface: TaskListener
Formatter.format(String, Object[]) version of TaskListener.error(String).

Specified by:
error in interface TaskListener

fatalError

public PrintWriter fatalError(String msg)
Description copied from interface: TaskListener
A fatal error in the build.

Specified by:
fatalError in interface TaskListener
Returns:
A writer to receive details of the error. Not null.

fatalError

public PrintWriter fatalError(String format,
                              Object... args)
Description copied from interface: TaskListener
Formatter.format(String, Object[]) version of TaskListener.fatalError(String).

Specified by:
fatalError in interface TaskListener

annotate

public void annotate(ConsoleNote ann)
Description copied from interface: TaskListener
Annotates the current position in the output log by using the given annotation. If the implementation doesn't support annotated output log, this method might be no-op.

Specified by:
annotate in interface TaskListener

close

public void close()


Copyright © 2004-2013. All Rights Reserved.