public final class ToolLogger extends Object
Modifier and Type | Method and Description |
---|---|
void |
debug(Element element,
String message)
Prints a debug message.
|
void |
debug(Element element,
String messageFormat,
Object... args)
Prints a formatted debug message if debugging is enabled.
|
void |
debug(String messageFormat,
Object... args)
Prints a formatted debug message if debugging is enabled.
|
void |
error(Element element,
String message)
Prints a error message.
|
void |
error(Element element,
String messageFormat,
Object... args)
Prints a formatted error message.
|
void |
error(Element element,
Throwable cause)
Prints an error message.
|
void |
error(Element element,
Throwable cause,
String messageFormat,
Object... args)
Prints an error message.
|
void |
error(String messageFormat,
Object... args)
Prints a formatted error message.
|
void |
error(Throwable cause)
Prints an error message.
|
void |
error(Throwable cause,
Element element,
String message)
Prints a error message.
|
void |
error(Throwable cause,
String messageFormat,
Object... args)
Prints an error message.
|
static ToolLogger |
getLogger(ProcessingEnvironment processingEnv)
Creates a new tool logger.
|
boolean |
isDebugEnabled()
Returns
true if debugging is enabled, otherwise false . |
void |
mandatoryWarning(Element element,
String message)
Prints a warning message.
|
void |
mandatoryWarning(Element element,
String messageFormat,
Object... args)
Prints a formatted warning message.
|
void |
note(Element element,
String message)
Prints a note message.
|
void |
note(Element element,
String messageFormat,
Object... args)
Prints a formatted note message.
|
void |
other(Element element,
String message)
Prints a message that does not fit the other types.
|
void |
other(Element element,
String messageFormat,
Object... args)
Prints a formatted message that does not fit the other types.
|
static String |
stackTraceToString(Throwable t)
Converts a stack trace to string output.
|
void |
warn(Element element,
String message)
Prints a warning message.
|
void |
warn(Element element,
String messageFormat,
Object... args)
Prints a formatted warning message.
|
public static ToolLogger getLogger(ProcessingEnvironment processingEnv)
processingEnv
- the processing environmentpublic boolean isDebugEnabled()
true
if debugging is enabled, otherwise false
.
It is not necessary to invoke this method before invoking debug
methods. The debug methods will only log messages if debugging is
enabled.
true
if debugging is enabled, otherwise false
.public void note(Element element, String message)
element
- the element to print with the note.message
- the message.public void note(Element element, String messageFormat, Object... args)
element
- the element to print with the note.messageFormat
- the message format.args
- the format arguments.public void debug(String messageFormat, Object... args)
messageFormat
- the message format.args
- the format arguments.public void debug(Element element, String message)
element
- the element to print with the note.message
- the message.public void debug(Element element, String messageFormat, Object... args)
element
- the element to print with the note.messageFormat
- the message format.args
- the format arguments.public void warn(Element element, String message)
element
- the element to print with the message.message
- the message.public void warn(Element element, String messageFormat, Object... args)
element
- the element that caused the warning.messageFormat
- the message format.args
- the format arguments.public void mandatoryWarning(Element element, String message)
element
- the element to print with the message.message
- the message.public void mandatoryWarning(Element element, String messageFormat, Object... args)
element
- the element that caused the warning.messageFormat
- the message format.args
- the format arguments.public void error(String messageFormat, Object... args)
messageFormat
- the message format.args
- the format arguments.public void error(Element element, String message)
element
- the element to print with the message.message
- the message.public void error(Element element, String messageFormat, Object... args)
messageFormat
- the message format.element
- the element that caused the warning.args
- the format arguments.public void error(Throwable cause)
cause
- the cause of the error.public void error(Throwable cause, Element element, String message)
cause
- the cause of the error.element
- the element to print with the message.message
- the message.public void error(Throwable cause, String messageFormat, Object... args)
cause
- the cause of the error.messageFormat
- the message format.args
- the format arguments.public void error(Element element, Throwable cause)
cause
- the cause of the error.element
- the element that caused the error.public void error(Element element, Throwable cause, String messageFormat, Object... args)
cause
- the cause of the error.messageFormat
- the message format.element
- the element that caused the warning.args
- the format arguments.public void other(Element element, String message)
element
- the element to print with the message.message
- the message.public void other(Element element, String messageFormat, Object... args)
element
- the element to print with the note.messageFormat
- the message format.args
- the format arguments.Copyright © 2017 JBoss by Red Hat. All rights reserved.