Package org.jboss.logging.processor.apt
Class ToolLogger
java.lang.Object
org.jboss.logging.processor.apt.ToolLogger
A logger for logging messages for annotation processors.
- Author:
- James R. Perkins, Kevin Pollet - SERLI - (kevin.pollet@serli.com)
-
Method Summary
Modifier and TypeMethodDescriptionvoidPrints a formatted debug message if debugging is enabled.voidPrints a debug message.voidPrints a formatted debug message if debugging is enabled.voidPrints a formatted error message.voidPrints an error message.voidPrints an error message.voidPrints a error message.voidPrints a error message.voidPrints a formatted error message.voidPrints an error message.voidPrints an error message.static ToolLoggergetLogger(ProcessingEnvironment processingEnv) Creates a new tool logger.booleanReturnstrueif debugging is enabled, otherwisefalse.voidmandatoryWarning(Element element, String message) Prints a warning message.voidmandatoryWarning(Element element, String messageFormat, Object... args) Prints a formatted warning message.voidPrints a note message.voidPrints a formatted note message.voidPrints a message that does not fit the other types.voidPrints a formatted message that does not fit the other types.static StringConverts a stack trace to string output.voidPrints a warning message.voidPrints a formatted warning message.
-
Method Details
-
getLogger
Creates a new tool logger.- Parameters:
processingEnv- the processing environment- Returns:
- a new tool logger
-
isDebugEnabled
public boolean isDebugEnabled()Returnstrueif debugging is enabled, otherwisefalse.It is not necessary to invoke this method before invoking
debugmethods. The debug methods will only log messages if debugging is enabled.- Returns:
trueif debugging is enabled, otherwisefalse.
-
note
Prints a note message.- Parameters:
element- the element to print with the note.message- the message.
-
note
Prints a formatted note message.- Parameters:
element- the element to print with the note.messageFormat- the message format.args- the format arguments.
-
debug
Prints a formatted debug message if debugging is enabled.- Parameters:
messageFormat- the message format.args- the format arguments.
-
debug
Prints a debug message.- Parameters:
element- the element to print with the note.message- the message.
-
debug
Prints a formatted debug message if debugging is enabled.- Parameters:
element- the element to print with the note.messageFormat- the message format.args- the format arguments.
-
warn
Prints a warning message.- Parameters:
element- the element to print with the message.message- the message.
-
warn
Prints a formatted warning message.- Parameters:
element- the element that caused the warning.messageFormat- the message format.args- the format arguments.
-
mandatoryWarning
Prints a warning message.- Parameters:
element- the element to print with the message.message- the message.
-
mandatoryWarning
Prints a formatted warning message.- Parameters:
element- the element that caused the warning.messageFormat- the message format.args- the format arguments.
-
error
Prints a formatted error message.- Parameters:
messageFormat- the message format.args- the format arguments.
-
error
Prints a error message.- Parameters:
element- the element to print with the message.message- the message.
-
error
Prints a formatted error message.- Parameters:
element- the element that caused the warning.messageFormat- the message format.args- the format arguments.
-
error
Prints an error message.- Parameters:
cause- the cause of the error.
-
error
Prints a error message.- Parameters:
cause- the cause of the error.element- the element to print with the message.message- the message.
-
error
Prints an error message.- Parameters:
cause- the cause of the error.messageFormat- the message format.args- the format arguments.
-
error
Prints an error message.- Parameters:
element- the element that caused the error.cause- the cause of the error.
-
error
Prints an error message.- Parameters:
element- the element that caused the warning.cause- the cause of the error.messageFormat- the message format.args- the format arguments.
-
other
Prints a message that does not fit the other types.- Parameters:
element- the element to print with the message.message- the message.
-
other
Prints a formatted message that does not fit the other types.- Parameters:
element- the element to print with the note.messageFormat- the message format.args- the format arguments.
-
stackTraceToString
Converts a stack trace to string output.- Parameters:
t- the stack trace to convert.- Returns:
- a string version of the stack trace.
-