Skip to content

Commit f72c843

Browse files
authored
Document all API changes in log4j-api (#3339)
Add missing `@since` and `@deprecated since` tags to `log4j-api`.
1 parent 5866d1b commit f72c843

File tree

66 files changed

+538
-71
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+538
-71
lines changed

log4j-api/src/main/java/org/apache/logging/log4j/BridgeAware.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
* Extended interface to allow bridges between logging systems to convey the
2121
* correct location information.
2222
*
23+
* @since 2.19.0
2324
*/
2425
public interface BridgeAware {
2526

log4j-api/src/main/java/org/apache/logging/log4j/CloseableThreadContext.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ public static CloseableThreadContext.Instance putAll(final Map<String, String> v
9999
return new CloseableThreadContext.Instance().putAll(values);
100100
}
101101

102+
/**
103+
* @since 2.6
104+
*/
102105
public static class Instance implements AutoCloseable {
103106

104107
private int pushCount = 0;

log4j-api/src/main/java/org/apache/logging/log4j/EventLogger.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
/**
2323
* Convenience to log {@link StructuredDataMessage}s.
2424
*
25-
* @deprecated {@link Logger} accepts {@link StructuredDataMessage}s, users should use to that instead.
25+
* @deprecated Deprecated since 2.24.0.
26+
* {@link Logger} accepts {@link StructuredDataMessage}s, users should use to that instead.
2627
*/
2728
@Deprecated
2829
public final class EventLogger {

log4j-api/src/main/java/org/apache/logging/log4j/LogBuilder.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
/**
2323
* Interface for constructing log events before logging them. Instances of LogBuilders should only be created
2424
* by calling one of the Logger methods that return a LogBuilder.
25+
*
26+
* @since 2.13.0
2527
*/
2628
public interface LogBuilder {
2729
/** NOOP Logbuilder */
@@ -110,7 +112,7 @@ default void log(final Supplier<Message> messageSupplier) {}
110112
*
111113
* @param messageSupplier The supplier of the message to log.
112114
* @return the message logger or {@code null} if no logging occurred.
113-
* @since 2.20
115+
* @since 2.20.0
114116
*/
115117
default Message logAndGet(final Supplier<Message> messageSupplier) {
116118
return null;
@@ -128,6 +130,7 @@ default void log(final Object message) {}
128130
* @param message the message to log; the format depends on the message factory.
129131
* @param p0 parameter to the message.
130132
*
133+
* @since 2.13.1
131134
* @see org.apache.logging.log4j.util.Unbox
132135
*/
133136
default void log(final String message, final Object p0) {}
@@ -139,6 +142,7 @@ default void log(final String message, final Object p0) {}
139142
* @param p0 parameter to the message.
140143
* @param p1 parameter to the message.
141144
*
145+
* @since 2.13.1
142146
* @see org.apache.logging.log4j.util.Unbox
143147
*/
144148
default void log(final String message, final Object p0, final Object p1) {}
@@ -151,6 +155,7 @@ default void log(final String message, final Object p0, final Object p1) {}
151155
* @param p1 parameter to the message.
152156
* @param p2 parameter to the message.
153157
*
158+
* @since 2.13.1
154159
* @see org.apache.logging.log4j.util.Unbox
155160
*/
156161
default void log(final String message, final Object p0, final Object p1, final Object p2) {}
@@ -164,6 +169,7 @@ default void log(final String message, final Object p0, final Object p1, final O
164169
* @param p2 parameter to the message.
165170
* @param p3 parameter to the message.
166171
*
172+
* @since 2.13.1
167173
* @see org.apache.logging.log4j.util.Unbox
168174
*/
169175
default void log(final String message, final Object p0, final Object p1, final Object p2, final Object p3) {}
@@ -178,6 +184,7 @@ default void log(final String message, final Object p0, final Object p1, final O
178184
* @param p3 parameter to the message.
179185
* @param p4 parameter to the message.
180186
*
187+
* @since 2.13.1
181188
* @see org.apache.logging.log4j.util.Unbox
182189
*/
183190
default void log(
@@ -199,6 +206,7 @@ default void log(
199206
* @param p4 parameter to the message.
200207
* @param p5 parameter to the message.
201208
*
209+
* @since 2.13.1
202210
* @see org.apache.logging.log4j.util.Unbox
203211
*/
204212
default void log(
@@ -222,6 +230,7 @@ default void log(
222230
* @param p5 parameter to the message.
223231
* @param p6 parameter to the message.
224232
*
233+
* @since 2.13.1
225234
* @see org.apache.logging.log4j.util.Unbox
226235
*/
227236
default void log(
@@ -247,6 +256,7 @@ default void log(
247256
* @param p6 parameter to the message.
248257
* @param p7 parameter to the message.
249258
*
259+
* @since 2.13.1
250260
* @see org.apache.logging.log4j.util.Unbox
251261
*/
252262
default void log(
@@ -274,6 +284,7 @@ default void log(
274284
* @param p7 parameter to the message.
275285
* @param p8 parameter to the message.
276286
*
287+
* @since 2.13.1
277288
* @see org.apache.logging.log4j.util.Unbox
278289
*/
279290
default void log(
@@ -303,6 +314,7 @@ default void log(
303314
* @param p8 parameter to the message.
304315
* @param p9 parameter to the message.
305316
*
317+
* @since 2.13.1
306318
* @see org.apache.logging.log4j.util.Unbox
307319
*/
308320
default void log(
@@ -320,6 +332,8 @@ default void log(
320332

321333
/**
322334
* Causes all the data collected to be logged. Default implementatoin does nothing.
335+
*
336+
* @since 2.14.1
323337
*/
324338
default void log() {}
325339
}

log4j-api/src/main/java/org/apache/logging/log4j/LogManager.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public class LogManager {
4343
/**
4444
* Log4j's property to set to the fully qualified class name of a custom implementation of
4545
* {@link LoggerContextFactory}.
46+
* @since 2.0.1
4647
* @deprecated Replaced since 2.24.0 with {@value org.apache.logging.log4j.spi.Provider#PROVIDER_PROPERTY_NAME}.
4748
*/
4849
@Deprecated
@@ -297,6 +298,7 @@ protected static LoggerContext getContext(
297298
* @param configLocation The URI for the configuration to use.
298299
* @param name The LoggerContext name.
299300
* @return a LoggerContext.
301+
* @since 2.9.1
300302
*/
301303
protected static LoggerContext getContext(
302304
final String fqcn,

0 commit comments

Comments
 (0)