aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaarten Mulders <m.th.mulders@xs4all.nl>2014-02-08 14:43:48 +0100
committerMaarten Mulders <m.th.mulders@xs4all.nl>2014-02-08 15:18:30 +0100
commitf13191e02c1b8e8e8857cadfcf29cfd15dd1f1ad (patch)
tree4ee01b6d70e52baee3d8a049c54fcda3bdf7270c /src
parentc38a64a5564996b552d88448bfb00722403bf194 (diff)
downloadlombok-f13191e02c1b8e8e8857cadfcf29cfd15dd1f1ad.tar.gz
lombok-f13191e02c1b8e8e8857cadfcf29cfd15dd1f1ad.tar.bz2
lombok-f13191e02c1b8e8e8857cadfcf29cfd15dd1f1ad.zip
Handlers and testcases for @CommonsLog
Diffstat (limited to 'src')
-rw-r--r--src/core/lombok/eclipse/handlers/HandleLog.java2
-rw-r--r--src/core/lombok/extern/apachecommons/CommonsLog.java4
-rw-r--r--src/core/lombok/javac/handlers/HandleLog.java2
3 files changed, 6 insertions, 2 deletions
diff --git a/src/core/lombok/eclipse/handlers/HandleLog.java b/src/core/lombok/eclipse/handlers/HandleLog.java
index ee9986b1..0f77bf76 100644
--- a/src/core/lombok/eclipse/handlers/HandleLog.java
+++ b/src/core/lombok/eclipse/handlers/HandleLog.java
@@ -161,7 +161,7 @@ public class HandleLog {
@ProviderFor(EclipseAnnotationHandler.class)
public static class HandleCommonsLog extends EclipseAnnotationHandler<lombok.extern.apachecommons.CommonsLog> {
@Override public void handle(AnnotationValues<lombok.extern.apachecommons.CommonsLog> annotation, Annotation source, EclipseNode annotationNode) {
- processAnnotation(LoggingFramework.COMMONS, annotation, source, annotationNode, "");
+ processAnnotation(LoggingFramework.COMMONS, annotation, source, annotationNode, annotation.getInstance().value());
}
}
diff --git a/src/core/lombok/extern/apachecommons/CommonsLog.java b/src/core/lombok/extern/apachecommons/CommonsLog.java
index 024e3744..34ac0fe6 100644
--- a/src/core/lombok/extern/apachecommons/CommonsLog.java
+++ b/src/core/lombok/extern/apachecommons/CommonsLog.java
@@ -59,4 +59,8 @@ import java.lang.annotation.Target;
@Retention(RetentionPolicy.SOURCE)
@Target(ElementType.TYPE)
public @interface CommonsLog {
+ /**
+ * Sets the category of the constructed Logger. By default, it will use the type where the annotation is placed.
+ */
+ String value() default "";
} \ No newline at end of file
diff --git a/src/core/lombok/javac/handlers/HandleLog.java b/src/core/lombok/javac/handlers/HandleLog.java
index 12aa07fb..2ad16b80 100644
--- a/src/core/lombok/javac/handlers/HandleLog.java
+++ b/src/core/lombok/javac/handlers/HandleLog.java
@@ -111,7 +111,7 @@ public class HandleLog {
@ProviderFor(JavacAnnotationHandler.class)
public static class HandleCommonsLog extends JavacAnnotationHandler<lombok.extern.apachecommons.CommonsLog> {
@Override public void handle(AnnotationValues<lombok.extern.apachecommons.CommonsLog> annotation, JCAnnotation ast, JavacNode annotationNode) {
- processAnnotation(LoggingFramework.COMMONS, annotation, annotationNode, "");
+ processAnnotation(LoggingFramework.COMMONS, annotation, annotationNode, annotation.getInstance().value());
}
}