diff --git a/src/core/lombok/CustomLog.java b/src/core/lombok/CustomLog.java index c6ea400d..0e01e29a 100644 --- a/src/core/lombok/CustomLog.java +++ b/src/core/lombok/CustomLog.java @@ -65,6 +65,13 @@ import java.lang.annotation.Target; @Retention(RetentionPolicy.SOURCE) @Target(ElementType.TYPE) public @interface CustomLog { + /** + * If you want your Logger to be non-private, you can specify an alternate access level here. + * + * @return The constructed Logger method will be generated with this access modifier. + */ + AccessLevel access() default AccessLevel.PRIVATE; + /** * * Sets a custom topic/category. Note that this requires you to specify a parameter configuration for your custom logger that includes {@code TOPIC}. diff --git a/src/core/lombok/extern/apachecommons/CommonsLog.java b/src/core/lombok/extern/apachecommons/CommonsLog.java index 973f556f..1a5d18dc 100644 --- a/src/core/lombok/extern/apachecommons/CommonsLog.java +++ b/src/core/lombok/extern/apachecommons/CommonsLog.java @@ -26,6 +26,8 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +import lombok.AccessLevel; + /** * Causes lombok to generate a logger field. *
@@ -62,6 +64,13 @@ import java.lang.annotation.Target; @Retention(RetentionPolicy.SOURCE) @Target(ElementType.TYPE) public @interface CommonsLog { + /** + * If you want your Logger to be non-private, you can specify an alternate access level here. + * + * @return The constructed Logger method will be generated with this access modifier. + */ + AccessLevel access() default AccessLevel.PRIVATE; + /** @return 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/flogger/Flogger.java b/src/core/lombok/extern/flogger/Flogger.java index 893032ed..d6e4786f 100644 --- a/src/core/lombok/extern/flogger/Flogger.java +++ b/src/core/lombok/extern/flogger/Flogger.java @@ -26,6 +26,8 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +import lombok.AccessLevel; + /** * Causes lombok to generate a logger field. *
@@ -60,4 +62,10 @@ import java.lang.annotation.Target; @Retention(RetentionPolicy.SOURCE) @Target(ElementType.TYPE) public @interface Flogger { + /** + * If you want your Logger to be non-private, you can specify an alternate access level here. + * + * @return The constructed Logger method will be generated with this access modifier. + */ + AccessLevel access() default AccessLevel.PRIVATE; } diff --git a/src/core/lombok/extern/java/Log.java b/src/core/lombok/extern/java/Log.java index 96e52191..7478c64e 100644 --- a/src/core/lombok/extern/java/Log.java +++ b/src/core/lombok/extern/java/Log.java @@ -26,6 +26,8 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +import lombok.AccessLevel; + /** * Causes lombok to generate a logger field. *
@@ -61,6 +63,13 @@ import java.lang.annotation.Target; @Retention(RetentionPolicy.SOURCE) @Target(ElementType.TYPE) public @interface Log { + /** + * If you want your logger to be non-private, you can specify an alternate access level here. + * + * @return The constructed Logger method will be generated with this access modifier. + */ + AccessLevel access() default AccessLevel.PRIVATE; + /** @return 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/jbosslog/JBossLog.java b/src/core/lombok/extern/jbosslog/JBossLog.java index a6e5e353..de6b76d2 100644 --- a/src/core/lombok/extern/jbosslog/JBossLog.java +++ b/src/core/lombok/extern/jbosslog/JBossLog.java @@ -26,6 +26,8 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +import lombok.AccessLevel; + /** * Causes lombok to generate a logger field. *
@@ -61,6 +63,13 @@ import java.lang.annotation.Target; @Retention(RetentionPolicy.SOURCE) @Target(ElementType.TYPE) public @interface JBossLog { + /** + * If you want your Logger to be non-private, you can specify an alternate access level here. + * + * @return The constructed Logger method will be generated with this access modifier. + */ + AccessLevel access() default AccessLevel.PRIVATE; + /** @return 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 3db01029..6dd809c5 100644 --- a/src/core/lombok/extern/log4j/Log4j.java +++ b/src/core/lombok/extern/log4j/Log4j.java @@ -26,6 +26,8 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +import lombok.AccessLevel; + /** * Causes lombok to generate a logger field. *
@@ -62,6 +64,13 @@ import java.lang.annotation.Target; @Retention(RetentionPolicy.SOURCE) @Target(ElementType.TYPE) public @interface Log4j { + /** + * If you want your Logger to be non-private, you can specify an alternate access level here. + * + * @return The constructed Logger method will be generated with this access modifier. + */ + AccessLevel access() default AccessLevel.PRIVATE; + /** @return 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/Log4j2.java b/src/core/lombok/extern/log4j/Log4j2.java index 3e59a532..741e408c 100644 --- a/src/core/lombok/extern/log4j/Log4j2.java +++ b/src/core/lombok/extern/log4j/Log4j2.java @@ -26,6 +26,8 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +import lombok.AccessLevel; + /** * Causes lombok to generate a logger field. *
@@ -62,6 +64,13 @@ import java.lang.annotation.Target; @Retention(RetentionPolicy.SOURCE) @Target(ElementType.TYPE) public @interface Log4j2 { + /** + * If you want your Logger to be non-private, you can specify an alternate access level here. + * + * @return The constructed Logger method will be generated with this access modifier. + */ + AccessLevel access() default AccessLevel.PRIVATE; + /** @return 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/slf4j/Slf4j.java b/src/core/lombok/extern/slf4j/Slf4j.java index da65e27c..e4747b99 100644 --- a/src/core/lombok/extern/slf4j/Slf4j.java +++ b/src/core/lombok/extern/slf4j/Slf4j.java @@ -26,6 +26,8 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +import lombok.AccessLevel; + /** * Causes lombok to generate a logger field. *
@@ -61,6 +63,13 @@ import java.lang.annotation.Target; @Retention(RetentionPolicy.SOURCE) @Target(ElementType.TYPE) public @interface Slf4j { + /** + * If you want your Logger to be non-private, you can specify an alternate access level here. + * + * @return The constructed Logger method will be generated with this access modifier. + */ + AccessLevel access() default AccessLevel.PRIVATE; + /** @return 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/slf4j/XSlf4j.java b/src/core/lombok/extern/slf4j/XSlf4j.java index 2dfef265..43ae82bc 100644 --- a/src/core/lombok/extern/slf4j/XSlf4j.java +++ b/src/core/lombok/extern/slf4j/XSlf4j.java @@ -26,6 +26,8 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +import lombok.AccessLevel; + /** * Causes lombok to generate a logger field. *
@@ -61,6 +63,13 @@ import java.lang.annotation.Target; @Retention(RetentionPolicy.SOURCE) @Target(ElementType.TYPE) public @interface XSlf4j { + /** + * If you want your Logger to be non-private, you can specify an alternate access level here. + * + * @return The constructed Logger method will be generated with this access modifier. + */ + AccessLevel access() default AccessLevel.PRIVATE; + /** @return The category of the constructed Logger. By default, it will use the type where the annotation is placed. */ String topic() default ""; }