aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS1
-rw-r--r--buildScripts/ivy.xml2
-rw-r--r--doc/changelog.markdown3
-rw-r--r--src/core/lombok/ConfigurationKeys.java7
-rw-r--r--src/core/lombok/Value.java4
-rw-r--r--src/core/lombok/core/Version.java6
-rw-r--r--src/core/lombok/eclipse/handlers/HandleLog.java15
-rw-r--r--src/core/lombok/extern/apachecommons/CommonsLog.java1
-rw-r--r--src/core/lombok/extern/java/Log.java1
-rw-r--r--src/core/lombok/extern/jbosslog/JBossLog.java67
-rw-r--r--src/core/lombok/extern/log4j/Log4j.java1
-rw-r--r--src/core/lombok/extern/log4j/Log4j2.java1
-rw-r--r--src/core/lombok/extern/slf4j/Slf4j.java3
-rw-r--r--src/core/lombok/extern/slf4j/XSlf4j.java1
-rw-r--r--src/core/lombok/javac/apt/LombokProcessor.java8
-rw-r--r--src/core/lombok/javac/handlers/HandleLog.java13
-rw-r--r--test/core/src/lombok/RunTestsViaEcj.java1
-rw-r--r--test/transform/resource/after-delombok/LoggerJBossLog.java23
-rw-r--r--test/transform/resource/after-ecj/LoggerJBossLog.java38
-rw-r--r--test/transform/resource/before/LoggerJBossLog.java20
-rw-r--r--website/features/Log.html8
-rw-r--r--website/mavenrepo/index.html11
22 files changed, 219 insertions, 16 deletions
diff --git a/AUTHORS b/AUTHORS
index e76b30a7..2817a21f 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -16,6 +16,7 @@ Roel Spilker <r.spilker@gmail.com>
Sander Koning <askoning@gmail.com>
Szymon Pacanowski <spacanowski@gmail.com>
Taiki Sugawara <buzz.taiki@gmail.com>
+Thomas Darimont <thomas.darimont@gmail.com>
Yun Zhi Lin <yun@yunspace.com>
By adding your name to this list, you grant full and irrevocable copyright and patent indemnity to Project Lombok and all use of Project Lombok, and you certify that you have the right to do so for all commits you add to Project Lombok.
diff --git a/buildScripts/ivy.xml b/buildScripts/ivy.xml
index f2f319e9..e0066ae4 100644
--- a/buildScripts/ivy.xml
+++ b/buildScripts/ivy.xml
@@ -24,6 +24,8 @@
<dependency org="commons-logging" name="commons-logging" rev="1.1.1" conf="test->default; contrib->sources"/>
<dependency org="org.slf4j" name="slf4j-api" rev="1.6.1" conf="test->default; contrib->sources"/>
<dependency org="org.slf4j" name="slf4j-ext" rev="1.6.1" conf="test->default; contrib->sources"/>
+ <dependency org="org.jboss.logging" name="jboss-logging" rev="3.3.0.Final" conf="test->default; contrib->sources"/>
+
<dependency org="com.google.guava" name="guava" rev="18.0" conf="test->default; contrib->sources" />
<dependency org="com.google.code.findbugs" name="findbugs" rev="3.0.0" conf="test->master" />
diff --git a/doc/changelog.markdown b/doc/changelog.markdown
index d9587b3b..361ddcf1 100644
--- a/doc/changelog.markdown
+++ b/doc/changelog.markdown
@@ -1,6 +1,9 @@
Lombok Changelog
----------------
+### v1.16.9 "Edgy Guinea Pig"
+* FEATURE: Added support for JBoss logger [Issue #1103](https://github.com/rzwitserloot/lombok/issues/1103)
+
### v1.16.8 (March 7th, 2016)
* PLATFORM: Starting jdk9 support: No more error message regarding `pid`
diff --git a/src/core/lombok/ConfigurationKeys.java b/src/core/lombok/ConfigurationKeys.java
index 73caf295..04decf69 100644
--- a/src/core/lombok/ConfigurationKeys.java
+++ b/src/core/lombok/ConfigurationKeys.java
@@ -337,6 +337,13 @@ public class ConfigurationKeys {
public static final ConfigurationKey<FlagUsageType> LOG_XSLF4J_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.log.xslf4j.flagUsage", "Emit a warning or error if @XSlf4j is used.") {};
/**
+ * lombok configuration: {@code lombok.log.jbosslog.flagUsage} = {@code WARNING} | {@code ERROR}.
+ *
+ * If set, <em>any</em> usage of {@code @JBossLog} results in a warning / error.
+ */
+ public static final ConfigurationKey<FlagUsageType> LOG_JBOSSLOG_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.log.jbosslog.flagUsage", "Emit a warning or error if @JBossLog is used.") {};
+
+ /**
* lombok configuration: {@code lombok.log.fieldName} = &lt;String: aJavaIdentifier&gt; (Default: {@code log}).
*
* If set the various log annotations (which make a log field) will use the stated identifier instead of {@code log} as a name.
diff --git a/src/core/lombok/Value.java b/src/core/lombok/Value.java
index 2cecea63..39154226 100644
--- a/src/core/lombok/Value.java
+++ b/src/core/lombok/Value.java
@@ -31,7 +31,7 @@ import java.lang.annotation.Target;
* <p>
* Equivalent to {@code @Getter @FieldDefaults(makeFinal=true, level=AccessLevel.PRIVATE) @AllArgsConstructor @ToString @EqualsAndHashCode}.
* <p>
- * Complete documentation is found at <a href="https://projectlombok.org/features/experimental/Value.html">the project lombok features page for &#64;Value</a>.
+ * Complete documentation is found at <a href="https://projectlombok.org/features/Value.html">the project lombok features page for &#64;Value</a>.
*
* @see lombok.Getter
* @see lombok.experimental.FieldDefaults
@@ -49,7 +49,7 @@ public @interface Value {
* We suggest the name: "of", like so:
*
* <pre>
- * public @Data(staticConstructor = "of") class Point { final int x, y; }
+ * public @Value(staticConstructor = "of") class Point { final int x, y; }
* </pre>
*
* Default: No static constructor, instead the normal constructor is public.
diff --git a/src/core/lombok/core/Version.java b/src/core/lombok/core/Version.java
index 549db9e1..ed245c08 100644
--- a/src/core/lombok/core/Version.java
+++ b/src/core/lombok/core/Version.java
@@ -30,9 +30,9 @@ public class Version {
// ** CAREFUL ** - this class must always compile with 0 dependencies (it must not refer to any other sources or libraries).
// Note: In 'X.Y.Z', if Z is odd, its a snapshot build built from the repository, so many different 0.10.3 versions can exist, for example.
// Official builds always end in an even number. (Since 0.10.2).
- private static final String VERSION = "1.16.8";
-// private static final String RELEASE_NAME = "Edgy Guinea Pig";
- private static final String RELEASE_NAME = "Candid Duck";
+ private static final String VERSION = "1.16.9";
+ private static final String RELEASE_NAME = "Edgy Guinea Pig";
+// private static final String RELEASE_NAME = "Candid Duck";
private Version() {
//Prevent instantiation
diff --git a/src/core/lombok/eclipse/handlers/HandleLog.java b/src/core/lombok/eclipse/handlers/HandleLog.java
index 830190a2..c49030d8 100644
--- a/src/core/lombok/eclipse/handlers/HandleLog.java
+++ b/src/core/lombok/eclipse/handlers/HandleLog.java
@@ -229,6 +229,17 @@ public class HandleLog {
}
}
+ /**
+ * Handles the {@link lombok.extern.jbosslog.JBossLog} annotation for Eclipse.
+ */
+ @ProviderFor(EclipseAnnotationHandler.class)
+ public static class HandleJBossLog extends EclipseAnnotationHandler<lombok.extern.jbosslog.JBossLog> {
+ @Override public void handle(AnnotationValues<lombok.extern.jbosslog.JBossLog> annotation, Annotation source, EclipseNode annotationNode) {
+ handleFlagUsage(annotationNode, ConfigurationKeys.LOG_JBOSSLOG_FLAG_USAGE, "@JBossLog", ConfigurationKeys.LOG_ANY_FLAG_USAGE, "any @Log");
+ processAnnotation(LoggingFramework.JBOSSLOG, annotation, source, annotationNode, annotation.getInstance().topic());
+ }
+ }
+
enum LoggingFramework {
// private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(TargetType.class);
COMMONS("org.apache.commons.logging.Log", "org.apache.commons.logging.LogFactory", "getLog", "@CommonsLog"),
@@ -264,7 +275,9 @@ public class HandleLog {
// private static final org.slf4j.ext.XLogger log = org.slf4j.ext.XLoggerFactory.getXLogger(TargetType.class);
XSLF4J("org.slf4j.ext.XLogger", "org.slf4j.ext.XLoggerFactory", "getXLogger", "@XSlf4j"),
-
+
+ // private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(TargetType.class);
+ JBOSSLOG("org.jboss.logging.Logger", "org.jboss.logging.Logger", "getLogger", "@JBossLog"),
;
private final String loggerTypeName;
diff --git a/src/core/lombok/extern/apachecommons/CommonsLog.java b/src/core/lombok/extern/apachecommons/CommonsLog.java
index 6e64d2d8..777f4b35 100644
--- a/src/core/lombok/extern/apachecommons/CommonsLog.java
+++ b/src/core/lombok/extern/apachecommons/CommonsLog.java
@@ -55,6 +55,7 @@ import java.lang.annotation.Target;
* @see lombok.extern.log4j.Log4j2 &#64;Log4j2
* @see lombok.extern.slf4j.Slf4j &#64;Slf4j
* @see lombok.extern.slf4j.XSlf4j &#64;XSlf4j
+ * @see lombok.extern.jbosslog.JBossLog &#64;JBossLog
*/
@Retention(RetentionPolicy.SOURCE)
@Target(ElementType.TYPE)
diff --git a/src/core/lombok/extern/java/Log.java b/src/core/lombok/extern/java/Log.java
index d2cf8c17..d5515283 100644
--- a/src/core/lombok/extern/java/Log.java
+++ b/src/core/lombok/extern/java/Log.java
@@ -54,6 +54,7 @@ import java.lang.annotation.Target;
* @see lombok.extern.log4j.Log4j2 &#64;Log4j2
* @see lombok.extern.slf4j.Slf4j &#64;Slf4j
* @see lombok.extern.slf4j.XSlf4j &#64;XSlf4j
+ * @see lombok.extern.jbosslog.JBossLog &#64;JBossLog
*/
@Retention(RetentionPolicy.SOURCE)
@Target(ElementType.TYPE)
diff --git a/src/core/lombok/extern/jbosslog/JBossLog.java b/src/core/lombok/extern/jbosslog/JBossLog.java
new file mode 100644
index 00000000..2735290c
--- /dev/null
+++ b/src/core/lombok/extern/jbosslog/JBossLog.java
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2016 The Project Lombok Authors.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+package lombok.extern.jbosslog;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Causes lombok to generate a logger field.
+ * <p>
+ * Complete documentation is found at <a href="https://projectlombok.org/features/Log.html">the project lombok features page for lombok log annotations</a>.
+ * <p>
+ * Example:
+ * <pre>
+ * &#64;JBossLog
+ * public class LogExample {
+ * }
+ * </pre>
+ *
+ * will generate:
+ *
+ * <pre>
+ * public class LogExample {
+ * private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(LogExample.class);
+ * }
+ * </pre>
+ *
+ * This annotation is valid for classes and enumerations.<br />
+ * @see org.jboss.logging.Logger org.jboss.logging.Logger
+ * @see org.jboss.logging.Logger#getLogger(java.lang.Class) org.jboss.logging.Logger.getLogger(Class target)
+ * @see lombok.extern.apachecommons.CommonsLog &#64;CommonsLog
+ * @see lombok.extern.java.Log &#64;Log
+ * @see lombok.extern.log4j.Log4j &#64;Log4j
+ * @see lombok.extern.log4j.Log4j2 &#64;Log4j2
+ * @see lombok.extern.slf4j.XSlf4j &#64;XSlf4j
+ * @see lombok.extern.jbosslog.JBossLog &#64;JBossLog
+ * */
+@Retention(RetentionPolicy.SOURCE)
+@Target(ElementType.TYPE)
+public @interface JBossLog {
+
+ /**
+ * Sets the category of the constructed Logger. By default, it will use the type where the annotation is placed.
+ */
+ String topic() default "";
+}
diff --git a/src/core/lombok/extern/log4j/Log4j.java b/src/core/lombok/extern/log4j/Log4j.java
index 31fedbe7..6c6ef1da 100644
--- a/src/core/lombok/extern/log4j/Log4j.java
+++ b/src/core/lombok/extern/log4j/Log4j.java
@@ -55,6 +55,7 @@ import java.lang.annotation.Target;
* @see lombok.extern.java.Log &#64;Log
* @see lombok.extern.slf4j.Slf4j &#64;Slf4j
* @see lombok.extern.slf4j.XSlf4j &#64;XSlf4j
+ * @see lombok.extern.jbosslog.JBossLog &#64;JBossLog
*/
@Retention(RetentionPolicy.SOURCE)
@Target(ElementType.TYPE)
diff --git a/src/core/lombok/extern/log4j/Log4j2.java b/src/core/lombok/extern/log4j/Log4j2.java
index 96d793f7..a1b2e0e7 100644
--- a/src/core/lombok/extern/log4j/Log4j2.java
+++ b/src/core/lombok/extern/log4j/Log4j2.java
@@ -55,6 +55,7 @@ import java.lang.annotation.Target;
* @see lombok.extern.java.Log &#64;Log
* @see lombok.extern.slf4j.Slf4j &#64;Slf4j
* @see lombok.extern.slf4j.XSlf4j &#64;XSlf4j
+ * @see lombok.extern.jbosslog.JBossLog &#64;JBossLog
*/
@Retention(RetentionPolicy.SOURCE)
@Target(ElementType.TYPE)
diff --git a/src/core/lombok/extern/slf4j/Slf4j.java b/src/core/lombok/extern/slf4j/Slf4j.java
index 571ebd58..efa6105f 100644
--- a/src/core/lombok/extern/slf4j/Slf4j.java
+++ b/src/core/lombok/extern/slf4j/Slf4j.java
@@ -54,7 +54,8 @@ import java.lang.annotation.Target;
* @see lombok.extern.log4j.Log4j &#64;Log4j
* @see lombok.extern.log4j.Log4j2 &#64;Log4j2
* @see lombok.extern.slf4j.XSlf4j &#64;XSlf4j
- * */
+ * @see lombok.extern.jbosslog.JBossLog &#64;JBossLog
+ */
@Retention(RetentionPolicy.SOURCE)
@Target(ElementType.TYPE)
public @interface Slf4j {
diff --git a/src/core/lombok/extern/slf4j/XSlf4j.java b/src/core/lombok/extern/slf4j/XSlf4j.java
index 369728c4..ce23ab9e 100644
--- a/src/core/lombok/extern/slf4j/XSlf4j.java
+++ b/src/core/lombok/extern/slf4j/XSlf4j.java
@@ -54,6 +54,7 @@ import java.lang.annotation.Target;
* @see lombok.extern.log4j.Log4j &#64;Log4j
* @see lombok.extern.log4j.Log4j2 &#64;Log4j2
* @see lombok.extern.slf4j.Slf4j &#64;Slf4j
+ * @see lombok.extern.jbosslog.JBossLog &#64;JBossLog
*/
@Retention(RetentionPolicy.SOURCE)
@Target(ElementType.TYPE)
diff --git a/src/core/lombok/javac/apt/LombokProcessor.java b/src/core/lombok/javac/apt/LombokProcessor.java
index 128545c7..6547c143 100644
--- a/src/core/lombok/javac/apt/LombokProcessor.java
+++ b/src/core/lombok/javac/apt/LombokProcessor.java
@@ -273,14 +273,12 @@ public class LombokProcessor extends AbstractProcessor {
if (newLevels.isEmpty()) return false;
newLevels.retainAll(priorityLevelsRequiringResolutionReset);
- if (newLevels.isEmpty()) {
- // None of the new levels need resolution, so just keep going.
- continue;
- } else {
+ if (!newLevels.isEmpty()){
// Force a new round to reset resolution. The next round will cause this method (process) to be called again.
forceNewRound((JavacFiler) processingEnv.getFiler());
return false;
}
+ // None of the new levels need resolution, so just keep going.
}
}
@@ -310,6 +308,6 @@ public class LombokProcessor extends AbstractProcessor {
* We just return the latest version of whatever JDK we run on. Stupid? Yeah, but it's either that or warnings on all versions but 1.
*/
@Override public SourceVersion getSupportedSourceVersion() {
- return SourceVersion.values()[SourceVersion.values().length - 1];
+ return SourceVersion.latest();
}
}
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;
diff --git a/test/core/src/lombok/RunTestsViaEcj.java b/test/core/src/lombok/RunTestsViaEcj.java
index 75200223..3f2698bb 100644
--- a/test/core/src/lombok/RunTestsViaEcj.java
+++ b/test/core/src/lombok/RunTestsViaEcj.java
@@ -144,6 +144,7 @@ public class RunTestsViaEcj extends AbstractRunTests {
classpath.add("lib/test/org.slf4j-slf4j-ext.jar");
classpath.add("lib/test/log4j-log4j.jar");
classpath.add("lib/test/org.apache.logging.log4j-log4j-api.jar");
+ classpath.add("lib/test/org.jboss.logging-jboss-logging.jar");
classpath.add("lib/test/com.google.guava-guava.jar");
classpath.add("lib/test/com.google.code.findbugs-findbugs.jar");
return new FileSystem(classpath.toArray(new String[0]), new String[] {file.getAbsolutePath()}, "UTF-8");
diff --git a/test/transform/resource/after-delombok/LoggerJBossLog.java b/test/transform/resource/after-delombok/LoggerJBossLog.java
new file mode 100644
index 00000000..8769f1a2
--- /dev/null
+++ b/test/transform/resource/after-delombok/LoggerJBossLog.java
@@ -0,0 +1,23 @@
+class LoggerJBossLog {
+ @java.lang.SuppressWarnings("all")
+ @javax.annotation.Generated("lombok")
+ private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(LoggerJBossLog.class);
+}
+class LoggerJBossLogWithImport {
+ @java.lang.SuppressWarnings("all")
+ @javax.annotation.Generated("lombok")
+ private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(LoggerJBossLogWithImport.class);
+}
+class LoggerJBossLogOuter {
+ static class Inner {
+ @java.lang.SuppressWarnings("all")
+ @javax.annotation.Generated("lombok")
+ private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(Inner.class);
+ }
+}
+
+class LoggerJBossLogWithDifferentLoggerName {
+ @java.lang.SuppressWarnings("all")
+ @javax.annotation.Generated("lombok")
+ private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger("DifferentLogger");
+} \ No newline at end of file
diff --git a/test/transform/resource/after-ecj/LoggerJBossLog.java b/test/transform/resource/after-ecj/LoggerJBossLog.java
new file mode 100644
index 00000000..e5c35708
--- /dev/null
+++ b/test/transform/resource/after-ecj/LoggerJBossLog.java
@@ -0,0 +1,38 @@
+import lombok.extern.jbosslog.JBossLog;
+@lombok.extern.jbosslog.JBossLog class LoggerJBossLog {
+ private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(LoggerJBossLog.class);
+ <clinit>() {
+ }
+ LoggerJBossLog() {
+ super();
+ }
+}
+@JBossLog class LoggerJBossLogWithImport {
+ private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(LoggerJBossLogWithImport.class);
+ <clinit>() {
+ }
+ LoggerJBossLogWithImport() {
+ super();
+ }
+}
+class LoggerJBossLogOuter {
+ static @lombok.extern.jbosslog.JBossLog class Inner {
+ private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(Inner.class);
+ <clinit>() {
+ }
+ Inner() {
+ super();
+ }
+ }
+ LoggerJBossLogOuter() {
+ super();
+ }
+}
+@JBossLog(topic = "DifferentLogger") class LoggerJBossLogWithDifferentLoggerName {
+ private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger("DifferentLogger");
+ <clinit>() {
+ }
+ LoggerJBossLogWithDifferentLoggerName() {
+ super();
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/before/LoggerJBossLog.java b/test/transform/resource/before/LoggerJBossLog.java
new file mode 100644
index 00000000..fbd88177
--- /dev/null
+++ b/test/transform/resource/before/LoggerJBossLog.java
@@ -0,0 +1,20 @@
+import lombok.extern.jbosslog.JBossLog;
+
+@lombok.extern.jbosslog.JBossLog
+class LoggerJBossLog {
+}
+
+@JBossLog
+class LoggerJBossLogWithImport {
+}
+
+class LoggerJBossLogOuter {
+ @lombok.extern.jbosslog.JBossLog
+ static class Inner {
+
+ }
+}
+
+@JBossLog(topic="DifferentLogger")
+class LoggerJBossLogWithDifferentLoggerName {
+} \ No newline at end of file
diff --git a/website/features/Log.html b/website/features/Log.html
index 31fab3dc..9415ddd9 100644
--- a/website/features/Log.html
+++ b/website/features/Log.html
@@ -18,10 +18,12 @@
<em>NEW in lombok 0.10: </em>You can annotate any class with a log annotation to let lombok generate a logger field.<br />
The logger is named <code>log</code> and the field's type depends on which logger you have selected.
</p><p>
- There are six choices available:<br />
+ There are several choices available:<br />
<dl>
<dt><code>@CommonsLog</code></dt>
<dd>Creates <code><span class="keyword">private&nbsp;static&nbsp;final&nbsp;</span><a href="http://commons.apache.org/logging/apidocs/org/apache/commons/logging/Log.html">org.apache.commons.logging.Log</a>&nbsp;<span class="staticfield">log</span>&nbsp;=&nbsp;<a href="http://commons.apache.org/logging/apidocs/org/apache/commons/logging/LogFactory.html#getLog(java.lang.Class)">org.apache.commons.logging.LogFactory.getLog</a>(LogExample.<span class="keyword">class</span>);</code></dd>
+ <dt><code>@JBossLog</code></dt>
+ <dd>Creates <code><span class="keyword">private&nbsp;static&nbsp;final&nbsp;</span><a href="http://docs.jboss.org/jbosslogging/latest/org/jboss/logging/Logger.html">org.jboss.logging.Logger</a>&nbsp;<span class="staticfield">log</span>&nbsp;=&nbsp;<a href="http://docs.jboss.org/jbosslogging/latest/org/jboss/logging/Logger.html#getLogger(java.lang.Class)">org.jboss.logging.Logger.getLogger</a>(LogExample.<span class="keyword">class</span>);</code></dd>
<dt><code>@Log</code></dt>
<dd>Creates <code><span class="keyword">private&nbsp;static&nbsp;final&nbsp;</span><a href="http://download.oracle.com/javase/6/docs/api/java/util/logging/Logger.html">java.util.logging.Logger</a>&nbsp;<span class="staticfield">log</span>&nbsp;=&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/logging/Logger.html#getLogger(java.lang.String)">java.util.logging.Logger.getLogger</a>(LogExample.<span class="keyword">class</span>.getName());</code></dd>
<dt><code>@Log4j</code></dt>
@@ -34,7 +36,7 @@
<dd>Creates <code><span class="keyword">private&nbsp;static&nbsp;final&nbsp;</span><a href="http://www.slf4j.org/api/org/slf4j/ext/XLogger.html">org.slf4j.ext.XLogger</a>&nbsp;<span class="staticfield">log</span>&nbsp;=&nbsp;<a href="http://www.slf4j.org/apidocs/org/slf4j/ext/XLoggerFactory.html#getXLogger(java.lang.Class)">org.slf4j.ext.XLoggerFactory.getXLogger</a>(LogExample.<span class="keyword">class</span>);</code></dd>
</dl>
</p><p>
- By default, the topic (or name) of the logger will be the class name of the class annotated with the <code>@Log</code> annotation. This can be customised by specifying the <code>topic</code> parameter. For example: <code>@XSlf4j(topic="reporting")</code>.
+ By default, the topic (or name) of the logger will be the class name of the class annotated with the <code>@Log</code> annotation. This can be customised by specifying the <code>topic</code> parameter. For example: <code>@XSlf4j(topic="reporting")</code>.
</p>
</div>
<div class="snippets">
@@ -62,6 +64,8 @@
<dd>Lombok will flag any usage of <code>@lombok.extern.apachecommons.CommonsLog</code> as a warning or error if configured.</dd>
<dt><code>lombok.log.javaUtilLogging.flagUsage</code> = [<code>warning</code> | <code>error</code>] (default: not set)</dt>
<dd>Lombok will flag any usage of <code>@lombok.extern.java.Log</code> as a warning or error if configured.</dd>
+ <dt><code>lombok.log.jbosslog.flagUsage</code> = [<code>warning</code> | <code>error</code>] (default: not set)</dt>
+ <dd>Lombok will flag any usage of <code>@lombok.extern.jbosslog.JBossLog</code> as a warning or error if configured.</dd>
<dt><code>lombok.log.log4j.flagUsage</code> = [<code>warning</code> | <code>error</code>] (default: not set)</dt>
<dd>Lombok will flag any usage of <code>@lombok.extern.log4j.Log4j</code> as a warning or error if configured.</dd>
<dt><code>lombok.log.log4j2.flagUsage</code> = [<code>warning</code> | <code>error</code>] (default: not set)</dt>
diff --git a/website/mavenrepo/index.html b/website/mavenrepo/index.html
index b97eb829..a51a5a20 100644
--- a/website/mavenrepo/index.html
+++ b/website/mavenrepo/index.html
@@ -66,12 +66,19 @@
<div class="snippet">libraryDependencies += "org.projectlombok" % "lombok" % "@VERSION@"</div>
</div>
<h2>Gradle</h2>
+
+ <div>
+ If your gradle version is <strong> >= 2.12</strong> you can use lombok by adding the following to your <strong>build.gradle</strong> in the <strong>dependencies</strong> block:
+ <div class="snippet">compileOnly "org.projectlombok:lombok:@VERSION@"</div>
+ </div>
<div>
- You can use lombok with gradle by adding the following to your <strong>build.gradle</strong> in the <strong>dependencies</strong> block:
+ If you use an older version you can still use the following:
<div class="snippet">provided "org.projectlombok:lombok:@VERSION@"</div>
+ as long as your gradle build include a war task (otherwise the "provided" scope is not available and you have to create your own configuration as <a href="https://issues.gradle.org/browse/GRADLE-784">explained here</a> )
</div>
+ <br>
<div>
- <em>NOTE:</em> You'll still need to download lombok, or doubleclick on the lombok.jar file downloaded by maven / ivy / gradle, to install lombok into your eclipse installation.
+ <strong><em>NOTE:</em></strong> You'll still need to download lombok, or doubleclick on the lombok.jar file downloaded by maven / ivy / gradle, to install lombok into your eclipse installation.
</div>
<a id="downloadLink" href="https://projectlombok.org/downloads/lombok.jar">Download lombok.jar</a>
</div>