aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/CustomLog.java
diff options
context:
space:
mode:
authorReinier Zwitserloot <r.zwitserloot@projectlombok.org>2019-05-21 22:57:45 +0200
committerReinier Zwitserloot <r.zwitserloot@projectlombok.org>2019-05-21 22:57:45 +0200
commit7fe489686716e72983d2c3586c7e2e1e07200ba7 (patch)
tree88a3eb6d85a0d9af1f95dc222d49147f7e0e291c /src/core/lombok/CustomLog.java
parentbb66465751b8f0b129e53e639854f95fcdb3dca8 (diff)
downloadlombok-7fe489686716e72983d2c3586c7e2e1e07200ba7.tar.gz
lombok-7fe489686716e72983d2c3586c7e2e1e07200ba7.tar.bz2
lombok-7fe489686716e72983d2c3586c7e2e1e07200ba7.zip
Code review for `@CustomLog`, and added documentation and a changelog entry.
Diffstat (limited to 'src/core/lombok/CustomLog.java')
-rw-r--r--src/core/lombok/CustomLog.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/core/lombok/CustomLog.java b/src/core/lombok/CustomLog.java
index 48c9f2ab..d1f45f7c 100644
--- a/src/core/lombok/CustomLog.java
+++ b/src/core/lombok/CustomLog.java
@@ -27,7 +27,7 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
- * Causes lombok to generate a logger field.
+ * Causes lombok to generate a logger field based on a custom logger implementation.
* <p>
* Complete documentation is found at <a href="https://projectlombok.org/features/Log">the project lombok features page for lombok log annotations</a>.
* <p>
@@ -50,7 +50,7 @@ import java.lang.annotation.Target;
* }
* </pre>
* <p>
- * Configuration must be provided in lombok.config, otherwise any usage will lead to errors.
+ * Configuration must be provided in lombok.config, otherwise any usage of this annotation will result in a compile-time error.
*
* This annotation is valid for classes and enumerations.<br>
* @see lombok.extern.java.Log &#64;Log
@@ -65,6 +65,11 @@ import java.lang.annotation.Target;
@Retention(RetentionPolicy.SOURCE)
@Target(ElementType.TYPE)
public @interface CustomLog {
- /** @return The category of the constructed Logger. By default, it will use the type where the annotation is placed. */
+ /**
+ *
+ * Sets a custom topic/category. Note that this requires you to specify a parameter configuration for your custom logger that includes {@code TOPIC}.
+ *
+ * @return The topic/category of the constructed Logger. By default (or for the empty string as topic), the parameter configuration without {@code TOPIC} is invoked.
+ */
String topic() default "";
}