diff options
author | Thomas Darimont <thomas.darimont@gmail.com> | 2016-05-06 19:14:47 +0200 |
---|---|---|
committer | Thomas Darimont <thomas.darimont@gmail.com> | 2016-05-06 19:14:47 +0200 |
commit | c0a2eecb2f6a647d9b9862681c0407043e515b51 (patch) | |
tree | 130751643656a89b61d20b19e16beec23b143df6 /src/core/lombok/extern | |
parent | 26ad9e7f5f4de77436d3d63e4a43e8cb77621c15 (diff) | |
download | lombok-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/extern')
-rw-r--r-- | src/core/lombok/extern/jbosslog/JBossLog.java | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/core/lombok/extern/jbosslog/JBossLog.java b/src/core/lombok/extern/jbosslog/JBossLog.java new file mode 100644 index 00000000..4dd587aa --- /dev/null +++ b/src/core/lombok/extern/jbosslog/JBossLog.java @@ -0,0 +1,46 @@ +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> + * @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 @CommonsLog + * @see lombok.extern.java.Log @Log + * @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 JBossLog { + + /** + * Sets the category of the constructed Logger. By default, it will use the type where the annotation is placed. + */ + String topic() default ""; +} |