log.name(exp)is mapped to
if (log.isLoggable(Level.NAME) {
log.name(exp)
}
Here name is a place holder for info, fine, finer, finest, config, warning, severe.
NAME is name transformed to upper case. if anything else is used it will result in
an exception at runtime. If the expression exp is a constant or only a variable access
the method call will not be transformed. But this will still cause a call on the injected
logger.
| Modifier and Type | Class and Description |
|---|---|
| public static class | Log.JavaUtilLoggingStrategy
This class contains the logic of how to weave a Java Util Logging logger into the host class. |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public Class | |
| public String | |
| public String | visibilityId()
If specified, must match the "id" attribute in a VisibilityOptions annotation to enable a custom visibility. |
| category | back to summary |
|---|---|
| public String category() | |
| loggingStrategy | back to summary |
|---|---|
| public Class | |
| value | back to summary |
|---|---|
| public String value() | |
| visibilityId | back to summary |
|---|---|
| public String visibilityId() If specified, must match the "id" attribute in a VisibilityOptions annotation to enable a custom visibility.
| |
| Modifier and Type | Field and Description |
|---|---|
| private static final ClassNode | |
| private static final ClassNode |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public FieldNode | addLoggerFieldToClass(ClassNode
the class that was originally annotated with the Log transformation. classNode, String the name of the logger field logFieldName, String the name of the logging category categoryName, int the modifiers (private, final, et. al.) of the logger field fieldModifiers)Implements org. |
| public boolean | |
| public Expression | wrapLoggingMethodCall(Expression logVariable, String methodName, Expression originalExpression)
Implements org. |
| LEVEL_CLASSNODE | back to summary |
|---|---|
| private static final ClassNode LEVEL_CLASSNODE | |
| LOGGER_CLASSNODE | back to summary |
|---|---|
| private static final ClassNode LOGGER_CLASSNODE | |
| JavaUtilLoggingStrategy | back to summary |
|---|---|
| protected JavaUtilLoggingStrategy(final GroovyClassLoader loader) | |
| addLoggerFieldToClass | back to summary |
|---|---|
| public FieldNode addLoggerFieldToClass(ClassNode classNode, String logFieldName, String categoryName, int fieldModifiers) Implements org. Doc from org. In this method, you are given a ClassNode, a field name and a category name, and you must add a new Field onto the class. Return the result of the ClassNode.addField operations.
| |
| isLoggingMethod | back to summary |
|---|---|
| public boolean isLoggingMethod(String methodName) Implements org.
| |
| wrapLoggingMethodCall | back to summary |
|---|---|
| public Expression wrapLoggingMethodCall(Expression logVariable, String methodName, Expression originalExpression) Implements org.
| |