aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/javac/handlers
diff options
context:
space:
mode:
authorThomas Darimont <thomas.darimont@gmail.com>2016-05-06 19:14:47 +0200
committerThomas Darimont <thomas.darimont@gmail.com>2016-05-06 19:14:47 +0200
commitc0a2eecb2f6a647d9b9862681c0407043e515b51 (patch)
tree130751643656a89b61d20b19e16beec23b143df6 /src/core/lombok/javac/handlers
parent26ad9e7f5f4de77436d3d63e4a43e8cb77621c15 (diff)
downloadlombok-c0a2eecb2f6a647d9b9862681c0407043e515b51.tar.gz
lombok-c0a2eecb2f6a647d9b9862681c0407043e515b51.tar.bz2
lombok-c0a2eecb2f6a647d9b9862681c0407043e515b51.zip
Added support for JBoss Logging v3.3.0-Final via @JBossLog [Issue #1103]
Diffstat (limited to 'src/core/lombok/javac/handlers')
-rw-r--r--src/core/lombok/javac/handlers/HandleLog.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/core/lombok/javac/handlers/HandleLog.java b/src/core/lombok/javac/handlers/HandleLog.java
index 06b7c7ef..d0d709e3 100644
--- a/src/core/lombok/javac/handlers/HandleLog.java
+++ b/src/core/lombok/javac/handlers/HandleLog.java
@@ -175,6 +175,17 @@ public class HandleLog {
}
}
+ /**
+ * Handles the {@link lombok.extern.jbosslog.JBossLog} annotation for javac.
+ */
+ @ProviderFor(JavacAnnotationHandler.class)
+ public static class HandleJBossLog extends JavacAnnotationHandler<lombok.extern.jbosslog.JBossLog> {
+ @Override public void handle(AnnotationValues<lombok.extern.jbosslog.JBossLog> annotation, JCAnnotation ast, JavacNode annotationNode) {
+ handleFlagUsage(annotationNode, ConfigurationKeys.LOG_JBOSSLOG_FLAG_USAGE, "@JBossLog", ConfigurationKeys.LOG_ANY_FLAG_USAGE, "any @Log");
+ processAnnotation(LoggingFramework.JBOSSLOG, annotation, annotationNode, annotation.getInstance().topic());
+ }
+ }
+
enum LoggingFramework {
// private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(TargetType.class);
COMMONS(lombok.extern.apachecommons.CommonsLog.class, "org.apache.commons.logging.Log", "org.apache.commons.logging.LogFactory.getLog"),
@@ -200,6 +211,8 @@ public class HandleLog {
// private static final org.slf4j.ext.XLogger log = org.slf4j.ext.XLoggerFactory.getXLogger(TargetType.class);
XSLF4J(lombok.extern.slf4j.XSlf4j.class, "org.slf4j.ext.XLogger", "org.slf4j.ext.XLoggerFactory.getXLogger"),
+ // private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(TargetType.class);
+ JBOSSLOG(lombok.extern.jbosslog.JBossLog.class, "org.jboss.logging.Logger", "org.jboss.logging.Logger.getLogger")
;
private final Class<? extends Annotation> annotationClass;