log.name(exp)is mapped to
if (log.isNameEnabled() {
log.name(exp)
}
Here name is a place holder for info, debug, warning, error, etc.
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 |
| 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 String | |
| private static final String |
| 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. |
| LOGGER_NAME | back to summary |
|---|---|
| private static final String LOGGER_NAME | |
| LOGGERFACTORY_NAME | back to summary |
|---|---|
| private static final String LOGGERFACTORY_NAME | |
| CommonsLoggingStrategy | back to summary |
|---|---|
| protected CommonsLoggingStrategy(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.
| |