From 3372b5f442110e004a3b1e1cd5116ecabf5f239e Mon Sep 17 00:00:00 2001
From: Roel Spilker
Date: Wed, 11 May 2016 21:26:37 +0200
Subject: Integrate JBossLog code
- fix jboss-logging.jar name
- add copyright notice to new source files
- add cross-references from other @Log annotations
- update feature page
---
.../lombok/extern/apachecommons/CommonsLog.java | 1 +
src/core/lombok/extern/java/Log.java | 1 +
src/core/lombok/extern/jbosslog/JBossLog.java | 21 +++++++++++++++++++++
src/core/lombok/extern/log4j/Log4j.java | 1 +
src/core/lombok/extern/log4j/Log4j2.java | 1 +
src/core/lombok/extern/slf4j/Slf4j.java | 3 ++-
src/core/lombok/extern/slf4j/XSlf4j.java | 1 +
test/core/src/lombok/RunTestsViaEcj.java | 2 +-
website/features/Log.html | 8 ++++++--
9 files changed, 35 insertions(+), 4 deletions(-)
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 @Log4j2
* @see lombok.extern.slf4j.Slf4j @Slf4j
* @see lombok.extern.slf4j.XSlf4j @XSlf4j
+ * @see lombok.extern.jbosslog.JBossLog @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 @Log4j2
* @see lombok.extern.slf4j.Slf4j @Slf4j
* @see lombok.extern.slf4j.XSlf4j @XSlf4j
+ * @see lombok.extern.jbosslog.JBossLog @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
index 4dd587aa..2735290c 100644
--- a/src/core/lombok/extern/jbosslog/JBossLog.java
+++ b/src/core/lombok/extern/jbosslog/JBossLog.java
@@ -1,3 +1,24 @@
+/*
+ * 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;
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 @Log
* @see lombok.extern.slf4j.Slf4j @Slf4j
* @see lombok.extern.slf4j.XSlf4j @XSlf4j
+ * @see lombok.extern.jbosslog.JBossLog @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 @Log
* @see lombok.extern.slf4j.Slf4j @Slf4j
* @see lombok.extern.slf4j.XSlf4j @XSlf4j
+ * @see lombok.extern.jbosslog.JBossLog @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 @Log4j
* @see lombok.extern.log4j.Log4j2 @Log4j2
* @see lombok.extern.slf4j.XSlf4j @XSlf4j
- * */
+ * @see lombok.extern.jbosslog.JBossLog @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 @Log4j
* @see lombok.extern.log4j.Log4j2 @Log4j2
* @see lombok.extern.slf4j.Slf4j @Slf4j
+ * @see lombok.extern.jbosslog.JBossLog @JBossLog
*/
@Retention(RetentionPolicy.SOURCE)
@Target(ElementType.TYPE)
diff --git a/test/core/src/lombok/RunTestsViaEcj.java b/test/core/src/lombok/RunTestsViaEcj.java
index 7dfe5e7e..3f2698bb 100644
--- a/test/core/src/lombok/RunTestsViaEcj.java
+++ b/test/core/src/lombok/RunTestsViaEcj.java
@@ -144,7 +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/jboss-logging.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/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 @@
NEW in lombok 0.10: You can annotate any class with a log annotation to let lombok generate a logger field.
The logger is named log
and the field's type depends on which logger you have selected.
- There are six choices available:
+ There are several choices available:
@CommonsLog
- Creates
private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(LogExample.class);
+ @JBossLog
+ - Creates
private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(LogExample.class);
@Log
- Creates
private static final java.util.logging.Logger log = java.util.logging.Logger.getLogger(LogExample.class.getName());
@Log4j
@@ -34,7 +36,7 @@
- Creates
private static final org.slf4j.ext.XLogger log = org.slf4j.ext.XLoggerFactory.getXLogger(LogExample.class);
- By default, the topic (or name) of the logger will be the class name of the class annotated with the @Log
annotation. This can be customised by specifying the topic
parameter. For example: @XSlf4j(topic="reporting")
.
+ By default, the topic (or name) of the logger will be the class name of the class annotated with the @Log
annotation. This can be customised by specifying the topic
parameter. For example: @XSlf4j(topic="reporting")
.
@@ -62,6 +64,8 @@
Lombok will flag any usage of @lombok.extern.apachecommons.CommonsLog
as a warning or error if configured.
lombok.log.javaUtilLogging.flagUsage
= [warning
| error
] (default: not set)
Lombok will flag any usage of @lombok.extern.java.Log
as a warning or error if configured.
+ lombok.log.jbosslog.flagUsage
= [warning
| error
] (default: not set)
+ Lombok will flag any usage of @lombok.extern.jbosslog.JBossLog
as a warning or error if configured.
lombok.log.log4j.flagUsage
= [warning
| error
] (default: not set)
Lombok will flag any usage of @lombok.extern.log4j.Log4j
as a warning or error if configured.
lombok.log.log4j2.flagUsage
= [warning
| error
] (default: not set)
--
cgit