Package io.jenkins.plugins.reporter.util
Class LogHandler
- java.lang.Object
-
- io.jenkins.plugins.reporter.util.LogHandler
-
public class LogHandler extends Object
-
-
Constructor Summary
Constructors Constructor Description LogHandler(TaskListener listener, String name)
Creates a newLogHandler
.LogHandler(TaskListener listener, String name, Report report)
Creates a newLogHandler
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
log(Report report)
Log all info and error messages that are stored in the set of issues.void
log(String format, Object... args)
Logs the specified message.
-
-
-
Constructor Detail
-
LogHandler
public LogHandler(TaskListener listener, String name)
Creates a newLogHandler
.- Parameters:
listener
- the task listener that will print all log messagesname
- the name of the logger
-
LogHandler
public LogHandler(TaskListener listener, String name, Report report)
Creates a newLogHandler
.- Parameters:
listener
- the task listener that will print all log messagesname
- the name of the loggerreport
- the report to log the messages from
-
-
Method Detail
-
log
public void log(Report report)
Log all info and error messages that are stored in the set of issues. Note that subsequent calls to this method will only log messages that have not yet been logged.- Parameters:
report
- the issues with the collected logging messages
-
log
@FormatMethod public void log(String format, Object... args)
Logs the specified message.- Parameters:
format
- A format stringargs
- Arguments referenced by the format specifiers in the format string. If there are more arguments than format specifiers, the extra arguments are ignored. The number of arguments is variable and may be zero.
-
-