@@ -200,7 +200,6 @@ public interface Logger {
200
200
* @param paramSuppliers An array of functions, which when called, produce the desired log message parameters.
201
201
* @since 2.4
202
202
*/
203
- @ SuppressWarnings ("deprecation" )
204
203
void debug (Marker marker , String message , Supplier <?>... paramSuppliers );
205
204
206
205
/**
@@ -222,7 +221,6 @@ public interface Logger {
222
221
* message factory.
223
222
* @since 2.4
224
223
*/
225
- @ SuppressWarnings ("deprecation" )
226
224
void debug (Marker marker , Supplier <?> messageSupplier );
227
225
228
226
/**
@@ -235,7 +233,6 @@ public interface Logger {
235
233
* @param throwable A Throwable or null.
236
234
* @since 2.4
237
235
*/
238
- @ SuppressWarnings ("deprecation" )
239
236
void debug (Marker marker , Supplier <?> messageSupplier , Throwable throwable );
240
237
241
238
/**
@@ -329,7 +326,6 @@ public interface Logger {
329
326
* @param paramSuppliers An array of functions, which when called, produce the desired log message parameters.
330
327
* @since 2.4
331
328
*/
332
- @ SuppressWarnings ("deprecation" )
333
329
void debug (String message , Supplier <?>... paramSuppliers );
334
330
335
331
/**
@@ -348,7 +344,6 @@ public interface Logger {
348
344
* message factory.
349
345
* @since 2.4
350
346
*/
351
- @ SuppressWarnings ("deprecation" )
352
347
void debug (Supplier <?> messageSupplier );
353
348
354
349
/**
@@ -360,7 +355,6 @@ public interface Logger {
360
355
* @param throwable the {@code Throwable} to log, including its stack trace.
361
356
* @since 2.4
362
357
*/
363
- @ SuppressWarnings ("deprecation" )
364
358
void debug (Supplier <?> messageSupplier , Throwable throwable );
365
359
366
360
/**
@@ -811,7 +805,6 @@ void debug(
811
805
* @param paramSuppliers An array of functions, which when called, produce the desired log message parameters.
812
806
* @since 2.4
813
807
*/
814
- @ SuppressWarnings ("deprecation" )
815
808
void error (Marker marker , String message , Supplier <?>... paramSuppliers );
816
809
817
810
/**
@@ -833,7 +826,6 @@ void debug(
833
826
* message factory.
834
827
* @since 2.4
835
828
*/
836
- @ SuppressWarnings ("deprecation" )
837
829
void error (Marker marker , Supplier <?> messageSupplier );
838
830
839
831
/**
@@ -846,7 +838,6 @@ void debug(
846
838
* @param throwable A Throwable or null.
847
839
* @since 2.4
848
840
*/
849
- @ SuppressWarnings ("deprecation" )
850
841
void error (Marker marker , Supplier <?> messageSupplier , Throwable throwable );
851
842
852
843
/**
@@ -940,7 +931,6 @@ void debug(
940
931
* @param paramSuppliers An array of functions, which when called, produce the desired log message parameters.
941
932
* @since 2.4
942
933
*/
943
- @ SuppressWarnings ("deprecation" )
944
934
void error (String message , Supplier <?>... paramSuppliers );
945
935
946
936
/**
@@ -959,7 +949,6 @@ void debug(
959
949
* message factory.
960
950
* @since 2.4
961
951
*/
962
- @ SuppressWarnings ("deprecation" )
963
952
void error (Supplier <?> messageSupplier );
964
953
965
954
/**
@@ -971,7 +960,6 @@ void debug(
971
960
* @param throwable the {@code Throwable} to log, including its stack trace.
972
961
* @since 2.4
973
962
*/
974
- @ SuppressWarnings ("deprecation" )
975
963
void error (Supplier <?> messageSupplier , Throwable throwable );
976
964
977
965
/**
@@ -1414,7 +1402,6 @@ void error(
1414
1402
* @param paramSuppliers An array of functions, which when called, produce the desired log message parameters.
1415
1403
* @since 2.4
1416
1404
*/
1417
- @ SuppressWarnings ("deprecation" )
1418
1405
void fatal (Marker marker , String message , Supplier <?>... paramSuppliers );
1419
1406
1420
1407
/**
@@ -1436,7 +1423,6 @@ void error(
1436
1423
* message factory.
1437
1424
* @since 2.4
1438
1425
*/
1439
- @ SuppressWarnings ("deprecation" )
1440
1426
void fatal (Marker marker , Supplier <?> messageSupplier );
1441
1427
1442
1428
/**
@@ -1449,7 +1435,6 @@ void error(
1449
1435
* @param throwable A Throwable or null.
1450
1436
* @since 2.4
1451
1437
*/
1452
- @ SuppressWarnings ("deprecation" )
1453
1438
void fatal (Marker marker , Supplier <?> messageSupplier , Throwable throwable );
1454
1439
1455
1440
/**
@@ -1543,7 +1528,6 @@ void error(
1543
1528
* @param paramSuppliers An array of functions, which when called, produce the desired log message parameters.
1544
1529
* @since 2.4
1545
1530
*/
1546
- @ SuppressWarnings ("deprecation" )
1547
1531
void fatal (String message , Supplier <?>... paramSuppliers );
1548
1532
1549
1533
/**
@@ -1562,7 +1546,6 @@ void error(
1562
1546
* message factory.
1563
1547
* @since 2.4
1564
1548
*/
1565
- @ SuppressWarnings ("deprecation" )
1566
1549
void fatal (Supplier <?> messageSupplier );
1567
1550
1568
1551
/**
@@ -1574,7 +1557,6 @@ void error(
1574
1557
* @param throwable the {@code Throwable} to log, including its stack trace.
1575
1558
* @since 2.4
1576
1559
*/
1577
- @ SuppressWarnings ("deprecation" )
1578
1560
void fatal (Supplier <?> messageSupplier , Throwable throwable );
1579
1561
1580
1562
/**
@@ -1901,12 +1883,13 @@ void fatal(
1901
1883
1902
1884
/**
1903
1885
* Gets the message factory used to convert message Objects and Strings/CharSequences into actual log Messages.
1904
- *
1905
- * Since version 2.6, Log4j internally uses message factories that implement the {@link MessageFactory2} interface.
1906
- * From version 2.6.2, the return type of this method was changed from {@link MessageFactory} to
1907
- * {@code <MF extends MessageFactory> MF}. The returned factory will always implement {@link MessageFactory2},
1908
- * but the return type of this method could not be changed to {@link MessageFactory2} without breaking binary
1909
- * compatibility.
1886
+ * <p>
1887
+ * Since version 2.6, Log4j internally uses message factories that implement the {@link MessageFactory2}
1888
+ * interface. From version 2.6.2, the return type of this method was changed from {@link MessageFactory} to
1889
+ * {@code <MF extends MessageFactory> MF}. The returned factory will always implement {@link MessageFactory2},
1890
+ * but the return type of this method could not be changed to {@link MessageFactory2} without breaking binary
1891
+ * compatibility.
1892
+ * </p>
1910
1893
*
1911
1894
* @return the message factory, as an instance of {@link MessageFactory2}
1912
1895
*/
@@ -2030,7 +2013,6 @@ void fatal(
2030
2013
* @param paramSuppliers An array of functions, which when called, produce the desired log message parameters.
2031
2014
* @since 2.4
2032
2015
*/
2033
- @ SuppressWarnings ("deprecation" )
2034
2016
void info (Marker marker , String message , Supplier <?>... paramSuppliers );
2035
2017
2036
2018
/**
@@ -2052,7 +2034,6 @@ void fatal(
2052
2034
* message factory.
2053
2035
* @since 2.4
2054
2036
*/
2055
- @ SuppressWarnings ("deprecation" )
2056
2037
void info (Marker marker , Supplier <?> messageSupplier );
2057
2038
2058
2039
/**
@@ -2065,7 +2046,6 @@ void fatal(
2065
2046
* @param throwable A Throwable or null.
2066
2047
* @since 2.4
2067
2048
*/
2068
- @ SuppressWarnings ("deprecation" )
2069
2049
void info (Marker marker , Supplier <?> messageSupplier , Throwable throwable );
2070
2050
2071
2051
/**
@@ -2159,7 +2139,6 @@ void fatal(
2159
2139
* @param paramSuppliers An array of functions, which when called, produce the desired log message parameters.
2160
2140
* @since 2.4
2161
2141
*/
2162
- @ SuppressWarnings ("deprecation" )
2163
2142
void info (String message , Supplier <?>... paramSuppliers );
2164
2143
2165
2144
/**
@@ -2178,7 +2157,6 @@ void fatal(
2178
2157
* message factory.
2179
2158
* @since 2.4
2180
2159
*/
2181
- @ SuppressWarnings ("deprecation" )
2182
2160
void info (Supplier <?> messageSupplier );
2183
2161
2184
2162
/**
@@ -2190,7 +2168,6 @@ void fatal(
2190
2168
* @param throwable the {@code Throwable} to log, including its stack trace.
2191
2169
* @since 2.4
2192
2170
*/
2193
- @ SuppressWarnings ("deprecation" )
2194
2171
void info (Supplier <?> messageSupplier , Throwable throwable );
2195
2172
2196
2173
/**
@@ -2737,7 +2714,6 @@ void info(
2737
2714
* @param paramSuppliers An array of functions, which when called, produce the desired log message parameters.
2738
2715
* @since 2.4
2739
2716
*/
2740
- @ SuppressWarnings ("deprecation" )
2741
2717
void log (Level level , Marker marker , String message , Supplier <?>... paramSuppliers );
2742
2718
2743
2719
/**
@@ -2760,7 +2736,6 @@ void info(
2760
2736
* message factory.
2761
2737
* @since 2.4
2762
2738
*/
2763
- @ SuppressWarnings ("deprecation" )
2764
2739
void log (Level level , Marker marker , Supplier <?> messageSupplier );
2765
2740
2766
2741
/**
@@ -2774,7 +2749,6 @@ void info(
2774
2749
* @param throwable A Throwable or null.
2775
2750
* @since 2.4
2776
2751
*/
2777
- @ SuppressWarnings ("deprecation" )
2778
2752
void log (Level level , Marker marker , Supplier <?> messageSupplier , Throwable throwable );
2779
2753
2780
2754
/**
@@ -2878,7 +2852,6 @@ void info(
2878
2852
* @param paramSuppliers An array of functions, which when called, produce the desired log message parameters.
2879
2853
* @since 2.4
2880
2854
*/
2881
- @ SuppressWarnings ("deprecation" )
2882
2855
void log (Level level , String message , Supplier <?>... paramSuppliers );
2883
2856
2884
2857
/**
@@ -2899,7 +2872,6 @@ void info(
2899
2872
* message factory.
2900
2873
* @since 2.4
2901
2874
*/
2902
- @ SuppressWarnings ("deprecation" )
2903
2875
void log (Level level , Supplier <?> messageSupplier );
2904
2876
2905
2877
/**
@@ -2912,7 +2884,6 @@ void info(
2912
2884
* @param throwable the {@code Throwable} to log, including its stack log.
2913
2885
* @since 2.4
2914
2886
*/
2915
- @ SuppressWarnings ("deprecation" )
2916
2887
void log (Level level , Supplier <?> messageSupplier , Throwable throwable );
2917
2888
2918
2889
/**
@@ -3435,7 +3406,6 @@ void log(
3435
3406
* @param paramSuppliers An array of functions, which when called, produce the desired log message parameters.
3436
3407
* @since 2.4
3437
3408
*/
3438
- @ SuppressWarnings ("deprecation" )
3439
3409
void trace (Marker marker , String message , Supplier <?>... paramSuppliers );
3440
3410
3441
3411
/**
@@ -3458,7 +3428,6 @@ void log(
3458
3428
* message factory.
3459
3429
* @since 2.4
3460
3430
*/
3461
- @ SuppressWarnings ("deprecation" )
3462
3431
void trace (Marker marker , Supplier <?> messageSupplier );
3463
3432
3464
3433
/**
@@ -3471,7 +3440,6 @@ void log(
3471
3440
* @param throwable A Throwable or null.
3472
3441
* @since 2.4
3473
3442
*/
3474
- @ SuppressWarnings ("deprecation" )
3475
3443
void trace (Marker marker , Supplier <?> messageSupplier , Throwable throwable );
3476
3444
3477
3445
/**
@@ -3567,7 +3535,6 @@ void log(
3567
3535
* @param paramSuppliers An array of functions, which when called, produce the desired log message parameters.
3568
3536
* @since 2.4
3569
3537
*/
3570
- @ SuppressWarnings ("deprecation" )
3571
3538
void trace (String message , Supplier <?>... paramSuppliers );
3572
3539
3573
3540
/**
@@ -3587,7 +3554,6 @@ void log(
3587
3554
* message factory.
3588
3555
* @since 2.4
3589
3556
*/
3590
- @ SuppressWarnings ("deprecation" )
3591
3557
void trace (Supplier <?> messageSupplier );
3592
3558
3593
3559
/**
@@ -3599,7 +3565,6 @@ void log(
3599
3565
* @param throwable the {@code Throwable} to log, including its stack trace.
3600
3566
* @since 2.4
3601
3567
*/
3602
- @ SuppressWarnings ("deprecation" )
3603
3568
void trace (Supplier <?> messageSupplier , Throwable throwable );
3604
3569
3605
3570
/**
@@ -3967,7 +3932,6 @@ void trace(
3967
3932
*
3968
3933
* @since 2.6
3969
3934
*/
3970
- @ SuppressWarnings ("deprecation" )
3971
3935
EntryMessage traceEntry (Supplier <?>... paramSuppliers );
3972
3936
3973
3937
/**
@@ -3986,7 +3950,6 @@ void trace(
3986
3950
*
3987
3951
* @since 2.6
3988
3952
*/
3989
- @ SuppressWarnings ("deprecation" )
3990
3953
EntryMessage traceEntry (String format , Supplier <?>... paramSuppliers );
3991
3954
3992
3955
/**
@@ -4205,7 +4168,6 @@ void trace(
4205
4168
* @param paramSuppliers An array of functions, which when called, produce the desired log message parameters.
4206
4169
* @since 2.4
4207
4170
*/
4208
- @ SuppressWarnings ("deprecation" )
4209
4171
void warn (Marker marker , String message , Supplier <?>... paramSuppliers );
4210
4172
4211
4173
/**
@@ -4227,7 +4189,6 @@ void trace(
4227
4189
* message factory.
4228
4190
* @since 2.4
4229
4191
*/
4230
- @ SuppressWarnings ("deprecation" )
4231
4192
void warn (Marker marker , Supplier <?> messageSupplier );
4232
4193
4233
4194
/**
@@ -4240,7 +4201,6 @@ void trace(
4240
4201
* @param throwable A Throwable or null.
4241
4202
* @since 2.4
4242
4203
*/
4243
- @ SuppressWarnings ("deprecation" )
4244
4204
void warn (Marker marker , Supplier <?> messageSupplier , Throwable throwable );
4245
4205
4246
4206
/**
@@ -4334,7 +4294,6 @@ void trace(
4334
4294
* @param paramSuppliers An array of functions, which when called, produce the desired log message parameters.
4335
4295
* @since 2.4
4336
4296
*/
4337
- @ SuppressWarnings ("deprecation" )
4338
4297
void warn (String message , Supplier <?>... paramSuppliers );
4339
4298
4340
4299
/**
@@ -4353,7 +4312,6 @@ void trace(
4353
4312
* message factory.
4354
4313
* @since 2.4
4355
4314
*/
4356
- @ SuppressWarnings ("deprecation" )
4357
4315
void warn (Supplier <?> messageSupplier );
4358
4316
4359
4317
/**
@@ -4365,7 +4323,6 @@ void trace(
4365
4323
* @param throwable the {@code Throwable} to log, including its stack warn.
4366
4324
* @since 2.4
4367
4325
*/
4368
- @ SuppressWarnings ("deprecation" )
4369
4326
void warn (Supplier <?> messageSupplier , Throwable throwable );
4370
4327
4371
4328
/**
@@ -4695,7 +4652,12 @@ void warn(
4695
4652
* @since 2.13.0
4696
4653
*/
4697
4654
default void logMessage (
4698
- Level level , Marker marker , String fqcn , StackTraceElement location , Message message , Throwable throwable ) {
4655
+ final Level level ,
4656
+ final Marker marker ,
4657
+ final String fqcn ,
4658
+ final StackTraceElement location ,
4659
+ final Message message ,
4660
+ final Throwable throwable ) {
4699
4661
// noop
4700
4662
}
4701
4663
@@ -4768,7 +4730,7 @@ default LogBuilder always() {
4768
4730
* @return a LogBuilder.
4769
4731
* @since 2.13.0
4770
4732
*/
4771
- default LogBuilder atLevel (Level level ) {
4733
+ default LogBuilder atLevel (final Level level ) {
4772
4734
return LogBuilder .NOOP ;
4773
4735
}
4774
4736
}