|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.plugins.analysis.util.PluginLogger
public class PluginLogger
A simple logger that prefixes each message with the plug-in name.
| Constructor Summary | |
|---|---|
|
PluginLogger(PrintStream logger,
String pluginName)
Creates a new instance of PluginLogger. |
protected |
PluginLogger(String pluginName)
Creates a new instance of PluginLogger. |
| Method Summary | |
|---|---|
void |
log(String message)
Logs the specified message. |
void |
log(Throwable throwable)
Logs the specified throwable. |
void |
logLines(String lines)
Logs several lines that already contain a prefix. |
void |
printStackTrace(Throwable throwable)
Logs the stack trace of the throwable. |
protected void |
setLogger(PrintStream logger)
Sets the logger to the specified value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PluginLogger(PrintStream logger,
String pluginName)
PluginLogger.
logger - the actual print stream to log topluginName - the plug-in nameprotected PluginLogger(String pluginName)
PluginLogger. Note that the logger
needs to be set afterwards to avoid throwing a NullPointerException.
pluginName - the plug-in name| Method Detail |
|---|
protected void setLogger(PrintStream logger)
logger - the value to setpublic void log(String message)
message - the messagepublic void log(Throwable throwable)
throwable - the throwablepublic void printStackTrace(Throwable throwable)
throwable - the throwablepublic void logLines(String lines)
lines - the lines to log
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||