From 47c7cc7fa46d883d46b4000028aab6ef5562a139 Mon Sep 17 00:00:00 2001 From: Ceki Gulcu Date: Wed, 28 Sep 2022 15:25:09 +0200 Subject: [PATCH] clarify Logger.makeLoggingEventBuilder javadoc Signed-off-by: Ceki Gulcu --- slf4j-api/src/main/java/org/slf4j/Logger.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/slf4j-api/src/main/java/org/slf4j/Logger.java b/slf4j-api/src/main/java/org/slf4j/Logger.java index cf638fc29..2803f7829 100644 --- a/slf4j-api/src/main/java/org/slf4j/Logger.java +++ b/slf4j-api/src/main/java/org/slf4j/Logger.java @@ -99,16 +99,18 @@ public interface Logger { /** *

Make a new {@link LoggingEventBuilder} instance as appropriate for this logger implementation. * This default implementation always returns a new instance of {@link DefaultLoggingEventBuilder}.

- * - *

Note that the {@link LoggingEventBuilder} should be built for all levels, independently of the level. - * In other words, this method is an unconditional constructor for the {@link LoggingEventBuilder} - * appropriate for this logger implementation.

- * + *

+ *

This method is intended to be used by logging systems implementing the SLF4J API and not + * by end users.

+ *

+ *

Also note that a {@link LoggingEventBuilder} instance should be built for all levels, + * independently of the level argument. In other words, this method is an unconditional + * constructor for the {@link LoggingEventBuilder} appropriate for this logger implementation.

+ *

* @param level desired level for the event builder - * @return a new {@link LoggingEventBuilder} instance as appropriate for this logger + * @return a new {@link LoggingEventBuilder} instance as appropriate for this logger * @since 2.0 */ - @CheckReturnValue default public LoggingEventBuilder makeLoggingEventBuilder(Level level) { return new DefaultLoggingEventBuilder(this, level); }